Documentation ¶
Overview ¶
Package dockerhubapi is a generated GoMock package.
Index ¶
- type Client
- type DockerHubToken
- type DockerImageDigest
- type MockClient
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) GetDigest(ctx context.Context, token DockerHubToken, repository, tag string) (DockerImageDigest, error)
- func (m *MockClient) GetDigestCached(ctx context.Context, repository, tag string) (DockerImageDigest, error)
- func (m *MockClient) GetToken(ctx context.Context, repository string) (DockerHubToken, error)
- type MockClientMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetToken(ctx context.Context, repository string) (token DockerHubToken, err error) GetDigest(ctx context.Context, token DockerHubToken, repository string, tag string) (digest DockerImageDigest, err error) GetDigestCached(ctx context.Context, repository string, tag string) (digest DockerImageDigest, err error) }
Client communicates with docker hub api
func NewLoggingClient ¶
NewLoggingClient returns a new instance of a logging Client.
func NewMetricsClient ¶
func NewMetricsClient(c Client, requestCount metrics.Counter, requestLatency metrics.Histogram) Client
NewMetricsClient returns a new instance of a metrics Client.
func NewTracingClient ¶
NewTracingClient returns a new instance of a tracing Client.
type DockerHubToken ¶
type DockerHubToken struct { Token string `json:"token"` ExpiresIn int `json:"expires_in"` IssuedAt time.Time `json:"issued_at"` }
DockerHubToken is a bearer token to authenticate requests with
func (*DockerHubToken) ExpiresAt ¶
func (t *DockerHubToken) ExpiresAt() time.Time
func (*DockerHubToken) IsExpired ¶
func (t *DockerHubToken) IsExpired() bool
type DockerImageDigest ¶
func (*DockerImageDigest) ExpiresAt ¶
func (t *DockerImageDigest) ExpiresAt() time.Time
func (*DockerImageDigest) IsExpired ¶
func (t *DockerImageDigest) IsExpired() bool
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) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClient) GetDigest ¶
func (m *MockClient) GetDigest(ctx context.Context, token DockerHubToken, repository, tag string) (DockerImageDigest, error)
GetDigest mocks base method
func (*MockClient) GetDigestCached ¶
func (m *MockClient) GetDigestCached(ctx context.Context, repository, tag string) (DockerImageDigest, error)
GetDigestCached mocks base method
func (*MockClient) GetToken ¶
func (m *MockClient) GetToken(ctx context.Context, repository string) (DockerHubToken, error)
GetToken mocks base method
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient
func (*MockClientMockRecorder) GetDigest ¶
func (mr *MockClientMockRecorder) GetDigest(ctx, token, repository, tag interface{}) *gomock.Call
GetDigest indicates an expected call of GetDigest
func (*MockClientMockRecorder) GetDigestCached ¶
func (mr *MockClientMockRecorder) GetDigestCached(ctx, repository, tag interface{}) *gomock.Call
GetDigestCached indicates an expected call of GetDigestCached
func (*MockClientMockRecorder) GetToken ¶
func (mr *MockClientMockRecorder) GetToken(ctx, repository interface{}) *gomock.Call
GetToken indicates an expected call of GetToken