image

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(ctx context.Context, domain string, opt types.DockerOption) (auth *imageTypes.DockerAuthConfig)

func RegisterRegistry

func RegisterRegistry(registry Registry)

Types

type Image

type Image interface {
	Name() (name string)
	LayerIDs() (layerIDs []string)
	ConfigInfo() imageTypes.BlobInfo
	ConfigBlob(context.Context) ([]byte, error)
	GetLayer(ctx context.Context, dig digest.Digest) (reader io.ReadCloser, err error)
	Close() (err error)
}

type ImageCloser

type ImageCloser interface {
	LayerInfos() (layerInfos []imageTypes.BlobInfo)
	ConfigInfo() imageTypes.BlobInfo
	ConfigBlob(context.Context) ([]byte, error)
	Close() error
}

type ImageCloserCloseExpectation

type ImageCloserCloseExpectation struct {
	Returns ImageCloserCloseReturns
}

type ImageCloserCloseReturns

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

type ImageCloserConfigBlobArgs

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

type ImageCloserConfigBlobExpectation

type ImageCloserConfigBlobExpectation struct {
	Args    ImageCloserConfigBlobArgs
	Returns ImageCloserConfigBlobReturns
}

type ImageCloserConfigBlobReturns

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

type ImageCloserConfigInfoExpectation

type ImageCloserConfigInfoExpectation struct {
	Returns ImageCloserConfigInfoReturns
}

type ImageCloserConfigInfoReturns

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

type ImageCloserLayerInfosExpectation

type ImageCloserLayerInfosExpectation struct {
	Returns ImageCloserLayerInfosReturns
}

type ImageCloserLayerInfosReturns

type ImageCloserLayerInfosReturns struct {
	LayerInfos []types.BlobInfo
}

type ImageConfigBlobArgs

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

type ImageConfigBlobExpectation

type ImageConfigBlobExpectation struct {
	Args    ImageConfigBlobArgs
	Returns ImageConfigBlobReturns
}

type ImageConfigBlobReturns

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

type ImageConfigInfoExpectation

type ImageConfigInfoExpectation struct {
	Returns ImageConfigInfoReturns
}

type ImageConfigInfoReturns

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

type ImageGetLayerArgs

type ImageGetLayerArgs struct {
	Ctx         context.Context
	CtxAnything bool
	Dig         digest.Digest
	DigAnything bool
}

type ImageGetLayerExpectation

type ImageGetLayerExpectation struct {
	Args    ImageGetLayerArgs
	Returns ImageGetLayerReturns
}

type ImageGetLayerReturns

type ImageGetLayerReturns struct {
	Reader io.ReadCloser
	Err    error
}

type ImageLayerIDsExpectation

type ImageLayerIDsExpectation struct {
	Returns ImageLayerIDsReturns
}

type ImageLayerIDsReturns

type ImageLayerIDsReturns struct {
	LayerIDs []string
}

type ImageNameExpectation

type ImageNameExpectation struct {
	Returns ImageNameReturns
}

type ImageNameReturns

type ImageNameReturns struct {
	Name string
}

type ImageSource

type ImageSource interface {
	GetBlob(ctx context.Context, info imageTypes.BlobInfo, cache imageTypes.BlobInfoCache) (reader io.ReadCloser, n int64, err error)
	Close() error
}

type ImageSourceCloseExpectation

type ImageSourceCloseExpectation struct {
	Returns ImageSourceCloseReturns
}

type ImageSourceCloseReturns

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

type ImageSourceGetBlobArgs

type ImageSourceGetBlobArgs struct {
	Ctx           context.Context
	CtxAnything   bool
	Info          types.BlobInfo
	InfoAnything  bool
	Cache         types.BlobInfoCache
	CacheAnything bool
}

type ImageSourceGetBlobExpectation

type ImageSourceGetBlobExpectation struct {
	Args    ImageSourceGetBlobArgs
	Returns ImageSourceGetBlobReturns
}

type ImageSourceGetBlobReturns

type ImageSourceGetBlobReturns struct {
	Reader io.ReadCloser
	N      int64
	Err    error
}

type MockImage

type MockImage struct {
	mock.Mock
}

MockImage is an autogenerated mock type for the Image type

func (*MockImage) ApplyConfigBlobExpectation

func (_m *MockImage) ApplyConfigBlobExpectation(e ImageConfigBlobExpectation)

func (*MockImage) ApplyConfigBlobExpectations

func (_m *MockImage) ApplyConfigBlobExpectations(expectations []ImageConfigBlobExpectation)

func (*MockImage) ApplyConfigInfoExpectation

func (_m *MockImage) ApplyConfigInfoExpectation(e ImageConfigInfoExpectation)

func (*MockImage) ApplyConfigInfoExpectations

func (_m *MockImage) ApplyConfigInfoExpectations(expectations []ImageConfigInfoExpectation)

func (*MockImage) ApplyGetLayerExpectation

func (_m *MockImage) ApplyGetLayerExpectation(e ImageGetLayerExpectation)

func (*MockImage) ApplyGetLayerExpectations

func (_m *MockImage) ApplyGetLayerExpectations(expectations []ImageGetLayerExpectation)

func (*MockImage) ApplyLayerIDsExpectation

func (_m *MockImage) ApplyLayerIDsExpectation(e ImageLayerIDsExpectation)

func (*MockImage) ApplyLayerIDsExpectations

func (_m *MockImage) ApplyLayerIDsExpectations(expectations []ImageLayerIDsExpectation)

func (*MockImage) ApplyNameExpectation

func (_m *MockImage) ApplyNameExpectation(e ImageNameExpectation)

func (*MockImage) ApplyNameExpectations

func (_m *MockImage) ApplyNameExpectations(expectations []ImageNameExpectation)

func (*MockImage) ConfigBlob

func (_m *MockImage) ConfigBlob(_a0 context.Context) ([]byte, error)

ConfigBlob provides a mock function with given fields: _a0

func (*MockImage) ConfigInfo

func (_m *MockImage) ConfigInfo() types.BlobInfo

ConfigInfo provides a mock function with given fields:

func (*MockImage) GetLayer

func (_m *MockImage) GetLayer(ctx context.Context, dig digest.Digest) (io.ReadCloser, error)

GetLayer provides a mock function with given fields: ctx, dig

func (*MockImage) LayerIDs

func (_m *MockImage) LayerIDs() []string

LayerIDs provides a mock function with given fields:

func (*MockImage) Name

func (_m *MockImage) Name() string

Name provides a mock function with given fields:

type MockImageCloser

type MockImageCloser struct {
	mock.Mock
}

MockImageCloser is an autogenerated mock type for the ImageCloser type

func (*MockImageCloser) ApplyCloseExpectation

func (_m *MockImageCloser) ApplyCloseExpectation(e ImageCloserCloseExpectation)

func (*MockImageCloser) ApplyCloseExpectations

func (_m *MockImageCloser) ApplyCloseExpectations(expectations []ImageCloserCloseExpectation)

func (*MockImageCloser) ApplyConfigBlobExpectation

func (_m *MockImageCloser) ApplyConfigBlobExpectation(e ImageCloserConfigBlobExpectation)

func (*MockImageCloser) ApplyConfigBlobExpectations

func (_m *MockImageCloser) ApplyConfigBlobExpectations(expectations []ImageCloserConfigBlobExpectation)

func (*MockImageCloser) ApplyConfigInfoExpectation

func (_m *MockImageCloser) ApplyConfigInfoExpectation(e ImageCloserConfigInfoExpectation)

func (*MockImageCloser) ApplyConfigInfoExpectations

func (_m *MockImageCloser) ApplyConfigInfoExpectations(expectations []ImageCloserConfigInfoExpectation)

func (*MockImageCloser) ApplyLayerInfosExpectation

func (_m *MockImageCloser) ApplyLayerInfosExpectation(e ImageCloserLayerInfosExpectation)

func (*MockImageCloser) ApplyLayerInfosExpectations

func (_m *MockImageCloser) ApplyLayerInfosExpectations(expectations []ImageCloserLayerInfosExpectation)

func (*MockImageCloser) Close

func (_m *MockImageCloser) Close() error

Close provides a mock function with given fields:

func (*MockImageCloser) ConfigBlob

func (_m *MockImageCloser) ConfigBlob(_a0 context.Context) ([]byte, error)

ConfigBlob provides a mock function with given fields: _a0

func (*MockImageCloser) ConfigInfo

func (_m *MockImageCloser) ConfigInfo() types.BlobInfo

ConfigInfo provides a mock function with given fields:

func (*MockImageCloser) LayerInfos

func (_m *MockImageCloser) LayerInfos() []types.BlobInfo

LayerInfos provides a mock function with given fields:

type MockImageSource

type MockImageSource struct {
	mock.Mock
}

MockImageSource is an autogenerated mock type for the ImageSource type

func (*MockImageSource) ApplyCloseExpectation

func (_m *MockImageSource) ApplyCloseExpectation(e ImageSourceCloseExpectation)

func (*MockImageSource) ApplyCloseExpectations

func (_m *MockImageSource) ApplyCloseExpectations(expectations []ImageSourceCloseExpectation)

func (*MockImageSource) ApplyGetBlobExpectation

func (_m *MockImageSource) ApplyGetBlobExpectation(e ImageSourceGetBlobExpectation)

func (*MockImageSource) ApplyGetBlobExpectations

func (_m *MockImageSource) ApplyGetBlobExpectations(expectations []ImageSourceGetBlobExpectation)

func (*MockImageSource) Close

func (_m *MockImageSource) Close() error

Close provides a mock function with given fields:

func (*MockImageSource) GetBlob

GetBlob provides a mock function with given fields: ctx, info, cache

type MockRegistry

type MockRegistry struct {
	mock.Mock
}

MockRegistry is an autogenerated mock type for the Registry type

func (*MockRegistry) ApplyCheckOptionsExpectation

func (_m *MockRegistry) ApplyCheckOptionsExpectation(e RegistryCheckOptionsExpectation)

func (*MockRegistry) ApplyCheckOptionsExpectations

func (_m *MockRegistry) ApplyCheckOptionsExpectations(expectations []RegistryCheckOptionsExpectation)

func (*MockRegistry) ApplyGetCredentialExpectation

func (_m *MockRegistry) ApplyGetCredentialExpectation(e RegistryGetCredentialExpectation)

func (*MockRegistry) ApplyGetCredentialExpectations

func (_m *MockRegistry) ApplyGetCredentialExpectations(expectations []RegistryGetCredentialExpectation)

func (*MockRegistry) CheckOptions

func (_m *MockRegistry) CheckOptions(domain string, option types.DockerOption) error

CheckOptions provides a mock function with given fields: domain, option

func (*MockRegistry) GetCredential

func (_m *MockRegistry) GetCredential(ctx context.Context) (string, string, error)

GetCredential provides a mock function with given fields: ctx

type RealImage

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

func NewImage

func NewImage(ctx context.Context, image Reference, transports []string, option types.DockerOption) (RealImage, error)

func (RealImage) Close

func (img RealImage) Close() error

func (RealImage) ConfigBlob

func (img RealImage) ConfigBlob(ctx context.Context) ([]byte, error)

func (RealImage) ConfigInfo

func (img RealImage) ConfigInfo() imageTypes.BlobInfo

func (RealImage) GetLayer

func (img RealImage) GetLayer(ctx context.Context, dig digest.Digest) (io.ReadCloser, error)

func (RealImage) LayerIDs

func (img RealImage) LayerIDs() []string

func (RealImage) Name

func (img RealImage) Name() string

type Reference

type Reference struct {
	Name   string
	IsFile bool
}

type Registry

type Registry interface {
	CheckOptions(domain string, option types.DockerOption) error
	GetCredential(ctx context.Context) (string, string, error)
}

type RegistryCheckOptionsArgs

type RegistryCheckOptionsArgs struct {
	Domain         string
	DomainAnything bool
	Option         types.DockerOption
	OptionAnything bool
}

type RegistryCheckOptionsExpectation

type RegistryCheckOptionsExpectation struct {
	Args    RegistryCheckOptionsArgs
	Returns RegistryCheckOptionsReturns
}

type RegistryCheckOptionsReturns

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

type RegistryGetCredentialArgs

type RegistryGetCredentialArgs struct {
	Ctx         context.Context
	CtxAnything bool
}

type RegistryGetCredentialExpectation

type RegistryGetCredentialExpectation struct {
	Args    RegistryGetCredentialArgs
	Returns RegistryGetCredentialReturns
}

type RegistryGetCredentialReturns

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

Directories

Path Synopsis
token
ecr
gcr

Jump to

Keyboard shortcuts

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