Documentation ¶
Overview ¶
Package mocks contains mocks for testing purposes.
Index ¶
- type Agent
- func (_m *Agent) EXPECT() *Agent_Expecter
- func (_m *Agent) Issue(entityId string, ttl string, ipAddrs []string) (amcerts.Cert, error)
- func (_m *Agent) ListCerts(pm sdk.PageMetadata) (amcerts.CertPage, error)
- func (_m *Agent) Revoke(serialNumber string) error
- func (_m *Agent) View(serialNumber string) (amcerts.Cert, error)
- type Agent_Expecter
- func (_e *Agent_Expecter) Issue(entityId interface{}, ttl interface{}, ipAddrs interface{}) *Agent_Issue_Call
- func (_e *Agent_Expecter) ListCerts(pm interface{}) *Agent_ListCerts_Call
- func (_e *Agent_Expecter) Revoke(serialNumber interface{}) *Agent_Revoke_Call
- func (_e *Agent_Expecter) View(serialNumber interface{}) *Agent_View_Call
- type Agent_Issue_Call
- func (_c *Agent_Issue_Call) Return(_a0 amcerts.Cert, _a1 error) *Agent_Issue_Call
- func (_c *Agent_Issue_Call) Run(run func(entityId string, ttl string, ipAddrs []string)) *Agent_Issue_Call
- func (_c *Agent_Issue_Call) RunAndReturn(run func(string, string, []string) (amcerts.Cert, error)) *Agent_Issue_Call
- type Agent_ListCerts_Call
- func (_c *Agent_ListCerts_Call) Return(_a0 amcerts.CertPage, _a1 error) *Agent_ListCerts_Call
- func (_c *Agent_ListCerts_Call) Run(run func(pm sdk.PageMetadata)) *Agent_ListCerts_Call
- func (_c *Agent_ListCerts_Call) RunAndReturn(run func(sdk.PageMetadata) (amcerts.CertPage, error)) *Agent_ListCerts_Call
- type Agent_Revoke_Call
- type Agent_View_Call
- type Service
- func (_m *Service) IssueCert(ctx context.Context, domainID string, token string, thingID string, ttl string) (certs.Cert, error)
- func (_m *Service) ListCerts(ctx context.Context, thingID string, pm certs.PageMetadata) (certs.CertPage, error)
- func (_m *Service) ListSerials(ctx context.Context, thingID string, pm certs.PageMetadata) (certs.CertPage, error)
- func (_m *Service) RevokeCert(ctx context.Context, domainID string, token string, thingID string) (certs.Revoke, error)
- func (_m *Service) ViewCert(ctx context.Context, serialID string) (certs.Cert, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
Agent is an autogenerated mock type for the Agent type
func NewAgent ¶
NewAgent creates a new instance of Agent. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Agent) EXPECT ¶
func (_m *Agent) EXPECT() *Agent_Expecter
type Agent_Expecter ¶
type Agent_Expecter struct {
// contains filtered or unexported fields
}
func (*Agent_Expecter) Issue ¶
func (_e *Agent_Expecter) Issue(entityId interface{}, ttl interface{}, ipAddrs interface{}) *Agent_Issue_Call
Issue is a helper method to define mock.On call
- entityId string
- ttl string
- ipAddrs []string
func (*Agent_Expecter) ListCerts ¶
func (_e *Agent_Expecter) ListCerts(pm interface{}) *Agent_ListCerts_Call
ListCerts is a helper method to define mock.On call
- pm sdk.PageMetadata
func (*Agent_Expecter) Revoke ¶
func (_e *Agent_Expecter) Revoke(serialNumber interface{}) *Agent_Revoke_Call
Revoke is a helper method to define mock.On call
- serialNumber string
func (*Agent_Expecter) View ¶
func (_e *Agent_Expecter) View(serialNumber interface{}) *Agent_View_Call
View is a helper method to define mock.On call
- serialNumber string
type Agent_Issue_Call ¶
Agent_Issue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Issue'
func (*Agent_Issue_Call) Return ¶
func (_c *Agent_Issue_Call) Return(_a0 amcerts.Cert, _a1 error) *Agent_Issue_Call
func (*Agent_Issue_Call) Run ¶
func (_c *Agent_Issue_Call) Run(run func(entityId string, ttl string, ipAddrs []string)) *Agent_Issue_Call
func (*Agent_Issue_Call) RunAndReturn ¶
func (_c *Agent_Issue_Call) RunAndReturn(run func(string, string, []string) (amcerts.Cert, error)) *Agent_Issue_Call
type Agent_ListCerts_Call ¶
Agent_ListCerts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCerts'
func (*Agent_ListCerts_Call) Return ¶
func (_c *Agent_ListCerts_Call) Return(_a0 amcerts.CertPage, _a1 error) *Agent_ListCerts_Call
func (*Agent_ListCerts_Call) Run ¶
func (_c *Agent_ListCerts_Call) Run(run func(pm sdk.PageMetadata)) *Agent_ListCerts_Call
func (*Agent_ListCerts_Call) RunAndReturn ¶
func (_c *Agent_ListCerts_Call) RunAndReturn(run func(sdk.PageMetadata) (amcerts.CertPage, error)) *Agent_ListCerts_Call
type Agent_Revoke_Call ¶
Agent_Revoke_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Revoke'
func (*Agent_Revoke_Call) Return ¶
func (_c *Agent_Revoke_Call) Return(_a0 error) *Agent_Revoke_Call
func (*Agent_Revoke_Call) Run ¶
func (_c *Agent_Revoke_Call) Run(run func(serialNumber string)) *Agent_Revoke_Call
func (*Agent_Revoke_Call) RunAndReturn ¶
func (_c *Agent_Revoke_Call) RunAndReturn(run func(string) error) *Agent_Revoke_Call
type Agent_View_Call ¶
Agent_View_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'View'
func (*Agent_View_Call) Return ¶
func (_c *Agent_View_Call) Return(_a0 amcerts.Cert, _a1 error) *Agent_View_Call
func (*Agent_View_Call) Run ¶
func (_c *Agent_View_Call) Run(run func(serialNumber string)) *Agent_View_Call
func (*Agent_View_Call) RunAndReturn ¶
func (_c *Agent_View_Call) RunAndReturn(run func(string) (amcerts.Cert, error)) *Agent_View_Call
type Service ¶
Service is an autogenerated mock type for the Service type
func NewService ¶
NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Service) IssueCert ¶
func (_m *Service) IssueCert(ctx context.Context, domainID string, token string, thingID string, ttl string) (certs.Cert, error)
IssueCert provides a mock function with given fields: ctx, domainID, token, thingID, ttl
func (*Service) ListCerts ¶
func (_m *Service) ListCerts(ctx context.Context, thingID string, pm certs.PageMetadata) (certs.CertPage, error)
ListCerts provides a mock function with given fields: ctx, thingID, pm
func (*Service) ListSerials ¶
func (_m *Service) ListSerials(ctx context.Context, thingID string, pm certs.PageMetadata) (certs.CertPage, error)
ListSerials provides a mock function with given fields: ctx, thingID, pm