mocks

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageValidatorService

type ImageValidatorService struct {
	mock.Mock
}

ImageValidatorService is an autogenerated mock type for the ImageValidatorService type

func NewImageValidatorService

func NewImageValidatorService(t mockConstructorTestingTNewImageValidatorService) *ImageValidatorService

NewImageValidatorService creates a new instance of ImageValidatorService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ImageValidatorService) Validate

func (_m *ImageValidatorService) Validate(ctx context.Context, image string) error

Validate provides a mock function with given fields: ctx, image

type NotaryRepoClient

type NotaryRepoClient struct {
	mock.Mock
}

NotaryRepoClient is an autogenerated mock type for the NotaryRepoClient type

func NewNotaryRepoClient

func NewNotaryRepoClient(t mockConstructorTestingTNewNotaryRepoClient) *NotaryRepoClient

NewNotaryRepoClient creates a new instance of NotaryRepoClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*NotaryRepoClient) AddDelegation

func (_m *NotaryRepoClient) AddDelegation(name data.RoleName, delegationKeys []data.PublicKey, paths []string) error

AddDelegation provides a mock function with given fields: name, delegationKeys, paths

func (*NotaryRepoClient) AddDelegationPaths

func (_m *NotaryRepoClient) AddDelegationPaths(name data.RoleName, paths []string) error

AddDelegationPaths provides a mock function with given fields: name, paths

func (*NotaryRepoClient) AddDelegationRoleAndKeys

func (_m *NotaryRepoClient) AddDelegationRoleAndKeys(name data.RoleName, delegationKeys []data.PublicKey) error

AddDelegationRoleAndKeys provides a mock function with given fields: name, delegationKeys

func (*NotaryRepoClient) AddTarget

func (_m *NotaryRepoClient) AddTarget(target *client.Target, roles ...data.RoleName) error

AddTarget provides a mock function with given fields: target, roles

func (*NotaryRepoClient) ClearDelegationPaths

func (_m *NotaryRepoClient) ClearDelegationPaths(name data.RoleName) error

ClearDelegationPaths provides a mock function with given fields: name

func (*NotaryRepoClient) GetAllTargetMetadataByName

func (_m *NotaryRepoClient) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)

GetAllTargetMetadataByName provides a mock function with given fields: name

func (*NotaryRepoClient) GetChangelist

func (_m *NotaryRepoClient) GetChangelist() (changelist.Changelist, error)

GetChangelist provides a mock function with given fields:

func (*NotaryRepoClient) GetCryptoService

func (_m *NotaryRepoClient) GetCryptoService() signed.CryptoService

GetCryptoService provides a mock function with given fields:

func (*NotaryRepoClient) GetDelegationRoles

func (_m *NotaryRepoClient) GetDelegationRoles() ([]data.Role, error)

GetDelegationRoles provides a mock function with given fields:

func (*NotaryRepoClient) GetGUN

func (_m *NotaryRepoClient) GetGUN() data.GUN

GetGUN provides a mock function with given fields:

func (*NotaryRepoClient) GetTargetByName

func (_m *NotaryRepoClient) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)

GetTargetByName provides a mock function with given fields: name, roles

func (*NotaryRepoClient) Initialize

func (_m *NotaryRepoClient) Initialize(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error

Initialize provides a mock function with given fields: rootKeyIDs, serverManagedRoles

func (*NotaryRepoClient) InitializeWithCertificate

func (_m *NotaryRepoClient) InitializeWithCertificate(rootKeyIDs []string, rootCerts []data.PublicKey, serverManagedRoles ...data.RoleName) error

InitializeWithCertificate provides a mock function with given fields: rootKeyIDs, rootCerts, serverManagedRoles

func (*NotaryRepoClient) ListRoles

func (_m *NotaryRepoClient) ListRoles() ([]client.RoleWithSignatures, error)

ListRoles provides a mock function with given fields:

func (*NotaryRepoClient) ListTargets

func (_m *NotaryRepoClient) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)

ListTargets provides a mock function with given fields: roles

func (*NotaryRepoClient) Publish

func (_m *NotaryRepoClient) Publish() error

Publish provides a mock function with given fields:

func (*NotaryRepoClient) RemoveDelegationKeys

func (_m *NotaryRepoClient) RemoveDelegationKeys(name data.RoleName, keyIDs []string) error

RemoveDelegationKeys provides a mock function with given fields: name, keyIDs

func (*NotaryRepoClient) RemoveDelegationKeysAndPaths

func (_m *NotaryRepoClient) RemoveDelegationKeysAndPaths(name data.RoleName, keyIDs []string, paths []string) error

RemoveDelegationKeysAndPaths provides a mock function with given fields: name, keyIDs, paths

func (*NotaryRepoClient) RemoveDelegationPaths

func (_m *NotaryRepoClient) RemoveDelegationPaths(name data.RoleName, paths []string) error

RemoveDelegationPaths provides a mock function with given fields: name, paths

func (*NotaryRepoClient) RemoveDelegationRole

func (_m *NotaryRepoClient) RemoveDelegationRole(name data.RoleName) error

RemoveDelegationRole provides a mock function with given fields: name

func (*NotaryRepoClient) RemoveTarget

func (_m *NotaryRepoClient) RemoveTarget(targetName string, roles ...data.RoleName) error

RemoveTarget provides a mock function with given fields: targetName, roles

func (*NotaryRepoClient) RotateKey

func (_m *NotaryRepoClient) RotateKey(role data.RoleName, serverManagesKey bool, keyList []string) error

RotateKey provides a mock function with given fields: role, serverManagesKey, keyList

func (*NotaryRepoClient) SetLegacyVersions

func (_m *NotaryRepoClient) SetLegacyVersions(_a0 int)

SetLegacyVersions provides a mock function with given fields: _a0

func (*NotaryRepoClient) Witness

func (_m *NotaryRepoClient) Witness(roles ...data.RoleName) ([]data.RoleName, error)

Witness provides a mock function with given fields: roles

type PodValidator

type PodValidator struct {
	mock.Mock
}

PodValidator is an autogenerated mock type for the PodValidator type

func NewPodValidator

func NewPodValidator(t mockConstructorTestingTNewPodValidator) *PodValidator

NewPodValidator creates a new instance of PodValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PodValidator) ValidatePod

func (_m *PodValidator) ValidatePod(ctx context.Context, pod *v1.Pod, ns *v1.Namespace) (validate.ValidationResult, error)

ValidatePod provides a mock function with given fields: ctx, pod, ns

type RepoFactory

type RepoFactory struct {
	mock.Mock
}

RepoFactory is an autogenerated mock type for the RepoFactory type

func NewRepoFactory

func NewRepoFactory(t mockConstructorTestingTNewRepoFactory) *RepoFactory

NewRepoFactory creates a new instance of RepoFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*RepoFactory) NewRepoClient

func (_m *RepoFactory) NewRepoClient(_a0 string, _a1 validate.NotaryConfig) (validate.NotaryRepoClient, error)

NewRepoClient provides a mock function with given fields: _a0, _a1

Jump to

Keyboard shortcuts

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