Documentation
¶
Overview ¶
Package mobileid is a generated GoMock package.
Package mobileid is a generated GoMock package.
Index ¶
- Constants
- type Client
- type Error
- type Job
- type Manager
- type MockClient
- func (m *MockClient) CreateSession(ctx context.Context, phoneNumber, nationalIdentityNumber string) (*Session, error)
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) FetchSession(ctx context.Context, sessionId string) (*Person, error)
- func (m *MockClient) Validate() error
- func (m *MockClient) WithHashType(hashType string) Client
- func (m *MockClient) WithLanguage(language string) Client
- func (m *MockClient) WithRelyingPartyName(name string) Client
- func (m *MockClient) WithRelyingPartyUUID(id string) Client
- func (m *MockClient) WithTLSConfig(tlsConfig *tls.Config) Client
- func (m *MockClient) WithText(text string) Client
- func (m *MockClient) WithTextFormat(format string) Client
- func (m *MockClient) WithTimeout(timeout time.Duration) Client
- func (m *MockClient) WithURL(url string) Client
- type MockClientMockRecorder
- func (mr *MockClientMockRecorder) CreateSession(ctx, phoneNumber, nationalIdentityNumber any) *gomock.Call
- func (mr *MockClientMockRecorder) FetchSession(ctx, sessionId any) *gomock.Call
- func (mr *MockClientMockRecorder) Validate() *gomock.Call
- func (mr *MockClientMockRecorder) WithHashType(hashType any) *gomock.Call
- func (mr *MockClientMockRecorder) WithLanguage(language any) *gomock.Call
- func (mr *MockClientMockRecorder) WithRelyingPartyName(name any) *gomock.Call
- func (mr *MockClientMockRecorder) WithRelyingPartyUUID(id any) *gomock.Call
- func (mr *MockClientMockRecorder) WithTLSConfig(tlsConfig any) *gomock.Call
- func (mr *MockClientMockRecorder) WithText(text any) *gomock.Call
- func (mr *MockClientMockRecorder) WithTextFormat(format any) *gomock.Call
- func (mr *MockClientMockRecorder) WithTimeout(timeout any) *gomock.Call
- func (mr *MockClientMockRecorder) WithURL(url any) *gomock.Call
- type MockWorker
- func (m *MockWorker) EXPECT() *MockWorkerMockRecorder
- func (m *MockWorker) Process(ctx context.Context, sessionId string) <-chan Result
- func (m *MockWorker) Start(ctx context.Context)
- func (m *MockWorker) Stop()
- func (m *MockWorker) WithConcurrency(concurrency int) Worker
- func (m *MockWorker) WithQueueSize(size int) Worker
- type MockWorkerMockRecorder
- func (mr *MockWorkerMockRecorder) Process(ctx, sessionId any) *gomock.Call
- func (mr *MockWorkerMockRecorder) Start(ctx any) *gomock.Call
- func (mr *MockWorkerMockRecorder) Stop() *gomock.Call
- func (mr *MockWorkerMockRecorder) WithConcurrency(concurrency any) *gomock.Call
- func (mr *MockWorkerMockRecorder) WithQueueSize(size any) *gomock.Call
- type Person
- type Result
- type Session
- type Worker
Constants ¶
const ( Running = "RUNNING" Complete = "COMPLETE" OK = "OK" NOT_MID_CLIENT = "NOT_MID_CLIENT" USER_CANCELLED = "USER_CANCELLED" SIGNATURE_HASH_MISMATCH = "SIGNATURE_HASH_MISMATCH" PHONE_ABSENT = "PHONE_ABSENT" DELIVERY_ERROR = "DELIVERY_ERROR" SIM_ERROR = "SIM_ERROR" TIMEOUT = "TIMEOUT" )
const ( Text = "Enter PIN1" TextFormat = "GSM-7" Language = "ENG" Timeout = requests.Timeout URL = "https://tsp.demo.sk.ee/mid-api" )
const ( DefaultConcurrency = 10 DefaultQueueSize = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
CreateSession(ctx context.Context, phoneNumber, nationalIdentityNumber string) (*Session, error)
FetchSession(ctx context.Context, sessionId string) (*Person, error)
WithRelyingPartyName(name string) Client
WithRelyingPartyUUID(id string) Client
WithHashType(hashType string) Client
WithText(text string) Client
WithTextFormat(format string) Client
WithLanguage(language string) Client
WithURL(url string) Client
WithTimeout(timeout time.Duration) Client
WithTLSConfig(tlsConfig *tls.Config) Client
Validate() error
}
type Error ¶
type Error struct {
Code string
}
Error represents an error from the Mobile-ID provider
type Manager ¶ added in v0.2.0
type Manager struct {
// contains filtered or unexported fields
}
func NewCertificateManager ¶ added in v0.2.0
NewCertificateManager creates a new certificate manager instance
func (*Manager) TLSConfig ¶ added in v0.2.0
TLSConfig returns a new tls.Config instance with the certificate pinning
func (*Manager) VerifyPeerCertificate ¶ added in v0.2.0
func (p *Manager) VerifyPeerCertificate(rawCerts [][]byte, _ [][]*x509.Certificate) error
VerifyPeerCertificate verifies the peer certificate against the pinned certificates
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) CreateSession ¶
func (m *MockClient) CreateSession(ctx context.Context, phoneNumber, nationalIdentityNumber string) (*Session, error)
CreateSession mocks base method.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) FetchSession ¶
FetchSession mocks base method.
func (*MockClient) WithHashType ¶
func (m *MockClient) WithHashType(hashType string) Client
WithHashType mocks base method.
func (*MockClient) WithLanguage ¶
func (m *MockClient) WithLanguage(language string) Client
WithLanguage mocks base method.
func (*MockClient) WithRelyingPartyName ¶
func (m *MockClient) WithRelyingPartyName(name string) Client
WithRelyingPartyName mocks base method.
func (*MockClient) WithRelyingPartyUUID ¶
func (m *MockClient) WithRelyingPartyUUID(id string) Client
WithRelyingPartyUUID mocks base method.
func (*MockClient) WithTLSConfig ¶ added in v0.2.0
func (m *MockClient) WithTLSConfig(tlsConfig *tls.Config) Client
WithTLSConfig mocks base method.
func (*MockClient) WithText ¶
func (m *MockClient) WithText(text string) Client
WithText mocks base method.
func (*MockClient) WithTextFormat ¶
func (m *MockClient) WithTextFormat(format string) Client
WithTextFormat mocks base method.
func (*MockClient) WithTimeout ¶
func (m *MockClient) WithTimeout(timeout time.Duration) Client
WithTimeout mocks base method.
func (*MockClient) WithURL ¶
func (m *MockClient) WithURL(url string) Client
WithURL mocks base method.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) CreateSession ¶
func (mr *MockClientMockRecorder) CreateSession(ctx, phoneNumber, nationalIdentityNumber any) *gomock.Call
CreateSession indicates an expected call of CreateSession.
func (*MockClientMockRecorder) FetchSession ¶
func (mr *MockClientMockRecorder) FetchSession(ctx, sessionId any) *gomock.Call
FetchSession indicates an expected call of FetchSession.
func (*MockClientMockRecorder) Validate ¶
func (mr *MockClientMockRecorder) Validate() *gomock.Call
Validate indicates an expected call of Validate.
func (*MockClientMockRecorder) WithHashType ¶
func (mr *MockClientMockRecorder) WithHashType(hashType any) *gomock.Call
WithHashType indicates an expected call of WithHashType.
func (*MockClientMockRecorder) WithLanguage ¶
func (mr *MockClientMockRecorder) WithLanguage(language any) *gomock.Call
WithLanguage indicates an expected call of WithLanguage.
func (*MockClientMockRecorder) WithRelyingPartyName ¶
func (mr *MockClientMockRecorder) WithRelyingPartyName(name any) *gomock.Call
WithRelyingPartyName indicates an expected call of WithRelyingPartyName.
func (*MockClientMockRecorder) WithRelyingPartyUUID ¶
func (mr *MockClientMockRecorder) WithRelyingPartyUUID(id any) *gomock.Call
WithRelyingPartyUUID indicates an expected call of WithRelyingPartyUUID.
func (*MockClientMockRecorder) WithTLSConfig ¶ added in v0.2.0
func (mr *MockClientMockRecorder) WithTLSConfig(tlsConfig any) *gomock.Call
WithTLSConfig indicates an expected call of WithTLSConfig.
func (*MockClientMockRecorder) WithText ¶
func (mr *MockClientMockRecorder) WithText(text any) *gomock.Call
WithText indicates an expected call of WithText.
func (*MockClientMockRecorder) WithTextFormat ¶
func (mr *MockClientMockRecorder) WithTextFormat(format any) *gomock.Call
WithTextFormat indicates an expected call of WithTextFormat.
func (*MockClientMockRecorder) WithTimeout ¶
func (mr *MockClientMockRecorder) WithTimeout(timeout any) *gomock.Call
WithTimeout indicates an expected call of WithTimeout.
type MockWorker ¶
type MockWorker struct {
// contains filtered or unexported fields
}
MockWorker is a mock of Worker interface.
func NewMockWorker ¶
func NewMockWorker(ctrl *gomock.Controller) *MockWorker
NewMockWorker creates a new mock instance.
func (*MockWorker) EXPECT ¶
func (m *MockWorker) EXPECT() *MockWorkerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWorker) Process ¶
func (m *MockWorker) Process(ctx context.Context, sessionId string) <-chan Result
Process mocks base method.
func (*MockWorker) WithConcurrency ¶
func (m *MockWorker) WithConcurrency(concurrency int) Worker
WithConcurrency mocks base method.
func (*MockWorker) WithQueueSize ¶
func (m *MockWorker) WithQueueSize(size int) Worker
WithQueueSize mocks base method.
type MockWorkerMockRecorder ¶
type MockWorkerMockRecorder struct {
// contains filtered or unexported fields
}
MockWorkerMockRecorder is the mock recorder for MockWorker.
func (*MockWorkerMockRecorder) Process ¶
func (mr *MockWorkerMockRecorder) Process(ctx, sessionId any) *gomock.Call
Process indicates an expected call of Process.
func (*MockWorkerMockRecorder) Start ¶
func (mr *MockWorkerMockRecorder) Start(ctx any) *gomock.Call
Start indicates an expected call of Start.
func (*MockWorkerMockRecorder) Stop ¶
func (mr *MockWorkerMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
func (*MockWorkerMockRecorder) WithConcurrency ¶
func (mr *MockWorkerMockRecorder) WithConcurrency(concurrency any) *gomock.Call
WithConcurrency indicates an expected call of WithConcurrency.
func (*MockWorkerMockRecorder) WithQueueSize ¶
func (mr *MockWorkerMockRecorder) WithQueueSize(size any) *gomock.Call
WithQueueSize indicates an expected call of WithQueueSize.