mocks

package
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mocks contains mocks for testing purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent added in v0.15.0

type Agent struct {
	mock.Mock
}

Agent is an autogenerated mock type for the Agent type

func NewAgent added in v0.15.0

func NewAgent(t interface {
	mock.TestingT
	Cleanup(func())
}) *Agent

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 added in v0.15.0

func (_m *Agent) EXPECT() *Agent_Expecter

func (*Agent) Issue added in v0.15.0

func (_m *Agent) Issue(entityId string, ttl string, ipAddrs []string) (amcerts.Cert, error)

Issue provides a mock function with given fields: entityId, ttl, ipAddrs

func (*Agent) ListCerts added in v0.15.0

func (_m *Agent) ListCerts(pm sdk.PageMetadata) (amcerts.CertPage, error)

ListCerts provides a mock function with given fields: pm

func (*Agent) Revoke added in v0.15.0

func (_m *Agent) Revoke(serialNumber string) error

Revoke provides a mock function with given fields: serialNumber

func (*Agent) View added in v0.15.0

func (_m *Agent) View(serialNumber string) (amcerts.Cert, error)

View provides a mock function with given fields: serialNumber

type Agent_Expecter added in v0.15.0

type Agent_Expecter struct {
	// contains filtered or unexported fields
}

func (*Agent_Expecter) Issue added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

type Agent_Issue_Call struct {
	*mock.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 added in v0.15.0

func (_c *Agent_Issue_Call) Return(_a0 amcerts.Cert, _a1 error) *Agent_Issue_Call

func (*Agent_Issue_Call) Run added in v0.15.0

func (_c *Agent_Issue_Call) Run(run func(entityId string, ttl string, ipAddrs []string)) *Agent_Issue_Call

func (*Agent_Issue_Call) RunAndReturn added in v0.15.0

func (_c *Agent_Issue_Call) RunAndReturn(run func(string, string, []string) (amcerts.Cert, error)) *Agent_Issue_Call

type Agent_ListCerts_Call added in v0.15.0

type Agent_ListCerts_Call struct {
	*mock.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 added in v0.15.0

func (*Agent_ListCerts_Call) Run added in v0.15.0

func (*Agent_ListCerts_Call) RunAndReturn added in v0.15.0

type Agent_Revoke_Call added in v0.15.0

type Agent_Revoke_Call struct {
	*mock.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 added in v0.15.0

func (_c *Agent_Revoke_Call) Return(_a0 error) *Agent_Revoke_Call

func (*Agent_Revoke_Call) Run added in v0.15.0

func (_c *Agent_Revoke_Call) Run(run func(serialNumber string)) *Agent_Revoke_Call

func (*Agent_Revoke_Call) RunAndReturn added in v0.15.0

func (_c *Agent_Revoke_Call) RunAndReturn(run func(string) error) *Agent_Revoke_Call

type Agent_View_Call added in v0.15.0

type Agent_View_Call struct {
	*mock.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 added in v0.15.0

func (_c *Agent_View_Call) Return(_a0 amcerts.Cert, _a1 error) *Agent_View_Call

func (*Agent_View_Call) Run added in v0.15.0

func (_c *Agent_View_Call) Run(run func(serialNumber string)) *Agent_View_Call

func (*Agent_View_Call) RunAndReturn added in v0.15.0

func (_c *Agent_View_Call) RunAndReturn(run func(string) (amcerts.Cert, error)) *Agent_View_Call

type Service added in v0.15.0

type Service struct {
	mock.Mock
}

Service is an autogenerated mock type for the Service type

func NewService added in v0.15.0

func NewService(t interface {
	mock.TestingT
	Cleanup(func())
}) *Service

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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

func (*Service) RevokeCert added in v0.15.0

func (_m *Service) RevokeCert(ctx context.Context, domainID string, token string, thingID string) (certs.Revoke, error)

RevokeCert provides a mock function with given fields: ctx, domainID, token, thingID

func (*Service) ViewCert added in v0.15.0

func (_m *Service) ViewCert(ctx context.Context, serialID string) (certs.Cert, error)

ViewCert provides a mock function with given fields: ctx, serialID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL