Documentation
¶
Overview ¶
Package client is a generated GoMock package.
Index ¶
- type DefaultHTTPClient
- type HTTPClient
- type MockHTTPClient
- func (m *MockHTTPClient) EXPECT() *MockHTTPClientMockRecorder
- func (m *MockHTTPClient) Get(ctx context.Context, serviceEndpointURL string, timestamp int) (map[string]vc.VerifiablePresentation, string, int, error)
- func (m *MockHTTPClient) Register(ctx context.Context, serviceEndpointURL string, ...) error
- type MockHTTPClientMockRecorder
- type PresentationsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultHTTPClient ¶
type DefaultHTTPClient struct {
// contains filtered or unexported fields
}
DefaultHTTPClient implements HTTPClient using HTTP.
func (DefaultHTTPClient) Register ¶
func (h DefaultHTTPClient) Register(ctx context.Context, serviceEndpointURL string, presentation vc.VerifiablePresentation) error
type HTTPClient ¶
type HTTPClient interface {
// Register registers a Verifiable Presentation on the remote Discovery Service.
Register(ctx context.Context, serviceEndpointURL string, presentation vc.VerifiablePresentation) error
// Get retrieves Verifiable Presentations from the remote Discovery Service, that were added since the given timestamp.
// If the call succeeds it returns the Verifiable Presentations and the timestamp that was returned by the server.
// If the given timestamp is 0, all Verifiable Presentations are retrieved.
Get(ctx context.Context, serviceEndpointURL string, timestamp int) (map[string]vc.VerifiablePresentation, string, int, error)
}
HTTPClient is the interface for the client that invokes the remote Discovery Service.
type MockHTTPClient ¶
type MockHTTPClient struct {
// contains filtered or unexported fields
}
MockHTTPClient is a mock of HTTPClient interface.
func NewMockHTTPClient ¶
func NewMockHTTPClient(ctrl *gomock.Controller) *MockHTTPClient
NewMockHTTPClient creates a new mock instance.
func (*MockHTTPClient) EXPECT ¶
func (m *MockHTTPClient) EXPECT() *MockHTTPClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockHTTPClient) Get ¶
func (m *MockHTTPClient) Get(ctx context.Context, serviceEndpointURL string, timestamp int) (map[string]vc.VerifiablePresentation, string, int, error)
Get mocks base method.
func (*MockHTTPClient) Register ¶
func (m *MockHTTPClient) Register(ctx context.Context, serviceEndpointURL string, presentation vc.VerifiablePresentation) error
Register mocks base method.
type MockHTTPClientMockRecorder ¶
type MockHTTPClientMockRecorder struct {
// contains filtered or unexported fields
}
MockHTTPClientMockRecorder is the mock recorder for MockHTTPClient.
type PresentationsResponse ¶
type PresentationsResponse struct {
// Entries contains mappings from timestamp (as string) to a VerifiablePresentation.
Entries map[string]vc.VerifiablePresentation `json:"entries"`
// Seed is a unique value for the combination of serviceID and a server instance.
Seed string `json:"seed"`
// Timestamp is the timestamp of the latest entry. It's not a unix timestamp but a Lamport Clock.
Timestamp int `json:"timestamp"`
}
PresentationsResponse is the response for the GetPresentations endpoint.
Click to show internal directories.
Click to hide internal directories.