fakenotary

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeNotary

type FakeNotary struct {
	GetNotaryRepoStub func(server, image, notaryToken string) (notaryclient.Repository, error)

	GetNotaryRepoArgsForCall []struct {
		Server      string
		Image       string
		NotaryToken string
	}
	// contains filtered or unexported fields
}

FakeNotary .

func (*FakeNotary) GetNotaryRepo

func (fake *FakeNotary) GetNotaryRepo(server, image, notaryToken string) (notaryclient.Repository, error)

GetNotaryRepo ...

func (*FakeNotary) GetNotaryRepoReturns

func (fake *FakeNotary) GetNotaryRepoReturns(notaryRepo notaryclient.Repository, err error)

GetNotaryRepoReturns ...

type FakeRepository

type FakeRepository struct {
	InitializeStub func(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error

	InitializeWithCertificateStub func(rootKeyIDs []string, rootCerts []data.PublicKey, serverManagedRoles ...data.RoleName) error

	PublishStub func() error

	AddTargetStub func(target *notaryclient.Target, roles ...data.RoleName) error

	RemoveTargetStub func(targetName string, roles ...data.RoleName) error

	ListTargetsStub func(roles ...data.RoleName) ([]*notaryclient.TargetWithRole, error)

	GetTargetByNameStub func(name string, roles ...data.RoleName) (*notaryclient.TargetWithRole, error)

	GetAllTargetMetadataByNameStub func(name string) ([]notaryclient.TargetSignedStruct, error)

	GetChangelistStub func() (changelist.Changelist, error)

	ListRolesStub func() ([]notaryclient.RoleWithSignatures, error)

	GetDelegationRolesStub func() ([]data.Role, error)

	AddDelegationStub func(name data.RoleName, delegationKeys []data.PublicKey, paths []string) error

	AddDelegationRoleAndKeysStub func(name data.RoleName, delegationKeys []data.PublicKey) error

	AddDelegationPathsStub func(name data.RoleName, paths []string) error

	RemoveDelegationKeysAndPathsStub func(name data.RoleName, keyIDs []string, paths []string) error

	RemoveDelegationRoleStub func(name data.RoleName) error

	RemoveDelegationPathsStub func(name data.RoleName, paths []string) error

	RemoveDelegationKeysStub func(name data.RoleName, keyIDs []string) error

	ClearDelegationPathsStub func(name data.RoleName) error

	WitnessStub func(roles ...data.RoleName) ([]data.RoleName, error)

	RotateKeyStub func(role data.RoleName, serverManagesKey bool, keyList []string) error

	GetCryptoServiceStub func() signed.CryptoService

	GetGUNStub func() data.GUN
	// contains filtered or unexported fields
}

FakeRepository .

func (*FakeRepository) AddDelegation

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

AddDelegation .

func (*FakeRepository) AddDelegationPaths

func (f *FakeRepository) AddDelegationPaths(name data.RoleName, paths []string) error

AddDelegationPaths .

func (*FakeRepository) AddDelegationPathsReturns

func (f *FakeRepository) AddDelegationPathsReturns(err error)

AddDelegationPathsReturns .

func (*FakeRepository) AddDelegationReturns

func (f *FakeRepository) AddDelegationReturns(err error)

AddDelegationReturns .

func (*FakeRepository) AddDelegationRoleAndKeys

func (f *FakeRepository) AddDelegationRoleAndKeys(name data.RoleName, delegationKeys []data.PublicKey) error

AddDelegationRoleAndKeys .

func (*FakeRepository) AddDelegationRoleAndKeysReturns

func (f *FakeRepository) AddDelegationRoleAndKeysReturns(err error)

AddDelegationRoleAndKeysReturns .

func (*FakeRepository) AddTarget

func (f *FakeRepository) AddTarget(target *notaryclient.Target, roles ...data.RoleName) error

AddTarget .

func (*FakeRepository) AddTargetReturns

func (f *FakeRepository) AddTargetReturns(err error)

AddTargetReturns .

func (*FakeRepository) ClearDelegationPaths

func (f *FakeRepository) ClearDelegationPaths(name data.RoleName) error

ClearDelegationPaths .

func (*FakeRepository) ClearDelegationPathsReturns

func (f *FakeRepository) ClearDelegationPathsReturns(err error)

ClearDelegationPathsReturns .

func (*FakeRepository) GetAllTargetMetadataByName

func (f *FakeRepository) GetAllTargetMetadataByName(name string) ([]notaryclient.TargetSignedStruct, error)

GetAllTargetMetadataByName .

func (*FakeRepository) GetAllTargetMetadataByNameReturns

func (f *FakeRepository) GetAllTargetMetadataByNameReturns(targetSignedStruct []notaryclient.TargetSignedStruct, err error)

GetAllTargetMetadataByNameReturns .

func (*FakeRepository) GetChangelist

func (f *FakeRepository) GetChangelist() (changelist.Changelist, error)

GetChangelist .

func (*FakeRepository) GetChangelistReturns

func (f *FakeRepository) GetChangelistReturns(list changelist.Changelist, err error)

GetChangelistReturns .

func (*FakeRepository) GetCryptoService

func (f *FakeRepository) GetCryptoService() signed.CryptoService

GetCryptoService .

func (*FakeRepository) GetCryptoServiceReturns

func (f *FakeRepository) GetCryptoServiceReturns(cryptoService signed.CryptoService)

GetCryptoServiceReturns .

func (*FakeRepository) GetDelegationRoles

func (f *FakeRepository) GetDelegationRoles() ([]data.Role, error)

GetDelegationRoles .

func (*FakeRepository) GetDelegationRolesReturns

func (f *FakeRepository) GetDelegationRolesReturns(role []data.Role, err error)

GetDelegationRolesReturns .

func (*FakeRepository) GetGUN

func (f *FakeRepository) GetGUN() data.GUN

GetGUN .

func (*FakeRepository) GetGUNReturns

func (f *FakeRepository) GetGUNReturns(gun data.GUN)

GetGUNReturns .

func (*FakeRepository) GetTargetByName

func (f *FakeRepository) GetTargetByName(name string, roles ...data.RoleName) (*notaryclient.TargetWithRole, error)

GetTargetByName ...

func (*FakeRepository) GetTargetByNameReturns

func (f *FakeRepository) GetTargetByNameReturns(targetWithRole *notaryclient.TargetWithRole, err error)

GetTargetByNameReturns .

func (*FakeRepository) Initialize

func (f *FakeRepository) Initialize(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error

Initialize .

func (*FakeRepository) InitializeReturns

func (f *FakeRepository) InitializeReturns(err error)

InitializeReturns .

func (*FakeRepository) InitializeWithCertificate

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

InitializeWithCertificate .

func (*FakeRepository) InitializeWithCertificateReturns

func (f *FakeRepository) InitializeWithCertificateReturns(err error)

InitializeWithCertificateReturns .

func (*FakeRepository) ListRoles

ListRoles .

func (*FakeRepository) ListRolesReturns

func (f *FakeRepository) ListRolesReturns(roleWithSignatures []notaryclient.RoleWithSignatures, err error)

ListRolesReturns .

func (*FakeRepository) ListTargets

func (f *FakeRepository) ListTargets(roles ...data.RoleName) ([]*notaryclient.TargetWithRole, error)

ListTargets .

func (*FakeRepository) ListTargetsReturns

func (f *FakeRepository) ListTargetsReturns(targetWithRole []*notaryclient.TargetWithRole, err error)

ListTargetsReturns .

func (*FakeRepository) Publish

func (f *FakeRepository) Publish() error

Publish .

func (*FakeRepository) PublishReturns

func (f *FakeRepository) PublishReturns(err error)

PublishReturns .

func (*FakeRepository) RemoveDelegationKeys

func (f *FakeRepository) RemoveDelegationKeys(name data.RoleName, keyIDs []string) error

RemoveDelegationKeys .

func (*FakeRepository) RemoveDelegationKeysAndPaths

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

RemoveDelegationKeysAndPaths .

func (*FakeRepository) RemoveDelegationKeysAndPathsReturns

func (f *FakeRepository) RemoveDelegationKeysAndPathsReturns(err error)

RemoveDelegationKeysAndPathsReturns .

func (*FakeRepository) RemoveDelegationKeysReturns

func (f *FakeRepository) RemoveDelegationKeysReturns(err error)

RemoveDelegationKeysReturns .

func (*FakeRepository) RemoveDelegationPaths

func (f *FakeRepository) RemoveDelegationPaths(name data.RoleName, paths []string) error

RemoveDelegationPaths .

func (*FakeRepository) RemoveDelegationPathsReturns

func (f *FakeRepository) RemoveDelegationPathsReturns(err error)

RemoveDelegationPathsReturns .

func (*FakeRepository) RemoveDelegationRole

func (f *FakeRepository) RemoveDelegationRole(name data.RoleName) error

RemoveDelegationRole .

func (*FakeRepository) RemoveDelegationRoleReturns

func (f *FakeRepository) RemoveDelegationRoleReturns(err error)

RemoveDelegationRoleReturns .

func (*FakeRepository) RemoveTarget

func (f *FakeRepository) RemoveTarget(targetName string, roles ...data.RoleName) error

RemoveTarget .

func (*FakeRepository) RemoveTargetReturns

func (f *FakeRepository) RemoveTargetReturns(err error)

RemoveTargetReturns .

func (*FakeRepository) RotateKey

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

RotateKey .

func (*FakeRepository) RotateKeyReturns

func (f *FakeRepository) RotateKeyReturns(err error)

RotateKeyReturns .

func (*FakeRepository) SetLegacyVersions

func (f *FakeRepository) SetLegacyVersions(version int)

SetLegacyVersions .

func (*FakeRepository) Witness

func (f *FakeRepository) Witness(roles ...data.RoleName) ([]data.RoleName, error)

Witness .

func (*FakeRepository) WitnessReturns

func (f *FakeRepository) WitnessReturns(roleName []data.RoleName, err error)

WitnessReturns .

Jump to

Keyboard shortcuts

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