imageinspector

package
v1.16.29-beta2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package imageinspector is a generated GoMock package.

Package imageinspector is a generated GoMock package.

Package imageinspector is a generated GoMock package.

Package imageinspector is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash string

type Info

type Info struct {
	FetchedAt  time.Time `json:"a,omitempty"`
	Entrypoint []string  `json:"e,omitempty"`
	Cmd        []string  `json:"c,omitempty"`
	Shell      string    `json:"s,omitempty"`
	WorkingDir string    `json:"w,omitempty"`
}

type InfoFetcher

type InfoFetcher interface {
	Fetch(ctx context.Context, registry, image string, pullSecrets []corev1.Secret) (*Info, error)
}

func NewSkopeoFetcher

func NewSkopeoFetcher() InfoFetcher

type Inspector

type Inspector interface {
	Inspect(ctx context.Context, registry, image string, pullPolicy corev1.PullPolicy, pullSecretNames []string) (*Info, error)
}

func NewInspector

func NewInspector(defaultRegistry string, infoFetcher InfoFetcher, secretFetcher SecretFetcher, storage ...Storage) Inspector

type MockInfoFetcher

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

MockInfoFetcher is a mock of InfoFetcher interface.

func NewMockInfoFetcher

func NewMockInfoFetcher(ctrl *gomock.Controller) *MockInfoFetcher

NewMockInfoFetcher creates a new mock instance.

func (*MockInfoFetcher) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInfoFetcher) Fetch

func (m *MockInfoFetcher) Fetch(arg0 context.Context, arg1, arg2 string, arg3 []v1.Secret) (*Info, error)

Fetch mocks base method.

type MockInfoFetcherMockRecorder

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

MockInfoFetcherMockRecorder is the mock recorder for MockInfoFetcher.

func (*MockInfoFetcherMockRecorder) Fetch

func (mr *MockInfoFetcherMockRecorder) Fetch(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Fetch indicates an expected call of Fetch.

type MockInspector

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

MockInspector is a mock of Inspector interface.

func NewMockInspector

func NewMockInspector(ctrl *gomock.Controller) *MockInspector

NewMockInspector creates a new mock instance.

func (*MockInspector) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInspector) Inspect

func (m *MockInspector) Inspect(arg0 context.Context, arg1, arg2 string, arg3 v1.PullPolicy, arg4 []string) (*Info, error)

Inspect mocks base method.

type MockInspectorMockRecorder

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

MockInspectorMockRecorder is the mock recorder for MockInspector.

func (*MockInspectorMockRecorder) Inspect

func (mr *MockInspectorMockRecorder) Inspect(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

Inspect indicates an expected call of Inspect.

type MockSecretFetcher

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

MockSecretFetcher is a mock of SecretFetcher interface.

func NewMockSecretFetcher

func NewMockSecretFetcher(ctrl *gomock.Controller) *MockSecretFetcher

NewMockSecretFetcher creates a new mock instance.

func (*MockSecretFetcher) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSecretFetcher) Get

func (m *MockSecretFetcher) Get(arg0 context.Context, arg1 string) (*v1.Secret, error)

Get mocks base method.

type MockSecretFetcherMockRecorder

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

MockSecretFetcherMockRecorder is the mock recorder for MockSecretFetcher.

func (*MockSecretFetcherMockRecorder) Get

func (mr *MockSecretFetcherMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call

Get indicates an expected call of Get.

type MockStorageWithTransfer

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

MockStorageWithTransfer is a mock of StorageWithTransfer interface.

func NewMockStorageWithTransfer

func NewMockStorageWithTransfer(ctrl *gomock.Controller) *MockStorageWithTransfer

NewMockStorageWithTransfer creates a new mock instance.

func (*MockStorageWithTransfer) CopyTo

func (m *MockStorageWithTransfer) CopyTo(arg0 context.Context, arg1 ...StorageTransfer) error

CopyTo mocks base method.

func (*MockStorageWithTransfer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStorageWithTransfer) Get

Get mocks base method.

func (*MockStorageWithTransfer) Store

func (m *MockStorageWithTransfer) Store(arg0 context.Context, arg1 RequestBase, arg2 Info) error

Store mocks base method.

func (*MockStorageWithTransfer) StoreMany

func (m *MockStorageWithTransfer) StoreMany(arg0 context.Context, arg1 map[Hash]Info) error

StoreMany mocks base method.

type MockStorageWithTransferMockRecorder

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

MockStorageWithTransferMockRecorder is the mock recorder for MockStorageWithTransfer.

func (*MockStorageWithTransferMockRecorder) CopyTo

func (mr *MockStorageWithTransferMockRecorder) CopyTo(arg0 interface{}, arg1 ...interface{}) *gomock.Call

CopyTo indicates an expected call of CopyTo.

func (*MockStorageWithTransferMockRecorder) Get

func (mr *MockStorageWithTransferMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockStorageWithTransferMockRecorder) Store

func (mr *MockStorageWithTransferMockRecorder) Store(arg0, arg1, arg2 interface{}) *gomock.Call

Store indicates an expected call of Store.

func (*MockStorageWithTransferMockRecorder) StoreMany

func (mr *MockStorageWithTransferMockRecorder) StoreMany(arg0, arg1 interface{}) *gomock.Call

StoreMany indicates an expected call of StoreMany.

type Request

type Request struct {
	RequestBase
	PullPolicy corev1.PullPolicy
}

type RequestBase

type RequestBase struct {
	Image    string
	Registry string
}

type SecretFetcher

type SecretFetcher interface {
	Get(ctx context.Context, name string) (*corev1.Secret, error)
}

func NewSecretFetcher

func NewSecretFetcher(client secret.Interface) SecretFetcher

type Storage

type Storage interface {
	Store(ctx context.Context, request RequestBase, info Info) error
	Get(ctx context.Context, request RequestBase) (*Info, error)
}

type StorageTransfer

type StorageTransfer interface {
	StoreMany(ctx context.Context, data map[Hash]Info) error
	CopyTo(ctx context.Context, other ...StorageTransfer) error
}

type StorageWithTransfer

type StorageWithTransfer interface {
	StorageTransfer
	Storage
}

func NewConfigMapStorage

func NewConfigMapStorage(client configmap.Interface, name string, avoidDirectGet bool) StorageWithTransfer

func NewMemoryStorage

func NewMemoryStorage() StorageWithTransfer

Jump to

Keyboard shortcuts

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