mocks

package
v0.0.0-...-4ee07f5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 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

type Agent struct {
	mock.Mock
}

Agent is an autogenerated mock type for the Agent type

func NewAgent

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

func (_m *Agent) EXPECT() *Agent_Expecter

func (*Agent) Issue

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

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

ListCerts provides a mock function with given fields: pm

func (*Agent) Revoke

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

Revoke provides a mock function with given fields: serialNumber

func (*Agent) View

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

View provides a mock function with given fields: serialNumber

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

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

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

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

func (*Agent_ListCerts_Call) Run

func (*Agent_ListCerts_Call) RunAndReturn

type Agent_Revoke_Call

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

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

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

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

type Service struct {
	mock.Mock
}

Service is an autogenerated mock type for the Service type

func NewService

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

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

func (*Service) RevokeCert

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

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