Documentation ¶
Index ¶
- Variables
- type ImageRegistry
- type MockPlatformImageService
- func (m *MockPlatformImageService) AppendImages(ctx context.Context, platformName string, version int, imageID []string) error
- func (m *MockPlatformImageService) CurrentImage(ctx context.Context, reg ImageRegistry, platformName string) (string, error)
- func (m *MockPlatformImageService) DeleteImages(ctx context.Context, platformName string) error
- func (m *MockPlatformImageService) FindImage(ctx context.Context, reg ImageRegistry, platformName, image string) (string, error)
- func (m *MockPlatformImageService) ListImages(ctx context.Context, platformName string) ([]string, error)
- func (m *MockPlatformImageService) ListImagesOrDefault(ctx context.Context, platformName string) ([]string, error)
- func (m *MockPlatformImageService) NewImage(ctx context.Context, reg ImageRegistry, platformName string, version int) (string, error)
- func (m *MockPlatformImageService) NewVersion(ctx context.Context, platformName string) (int, error)
- type MockPlatformImageStorage
- func (m *MockPlatformImageStorage) Append(ctx context.Context, name string, version int, images []string) error
- func (m *MockPlatformImageStorage) Delete(ctx context.Context, name string) error
- func (m *MockPlatformImageStorage) FindByName(ctx context.Context, name string) (*PlatformImage, error)
- func (m *MockPlatformImageStorage) Upsert(ctx context.Context, name string) (*PlatformImage, error)
- type PlatformImage
- type PlatformImageService
- type PlatformImageStorage
- type RegistryVersion
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPlatformImageNotFound = errors.New("Platform image not found")
)
Functions ¶
This section is empty.
Types ¶
type MockPlatformImageService ¶
type MockPlatformImageService struct { OnNewVersion func(string) (int, error) OnNewImage func(ImageRegistry, string, int) (string, error) OnCurrentImage func(ImageRegistry, string) (string, error) OnAppendImages func(string, int, []string) error OnDeleteImages func(string) error OnListImages func(string) ([]string, error) OnListImagesOrDefault func(string) ([]string, error) OnFindImage func(ImageRegistry, string, string) (string, error) }
MockPlatformImageService implements PlatformImageService interface
func (*MockPlatformImageService) AppendImages ¶
func (*MockPlatformImageService) CurrentImage ¶
func (m *MockPlatformImageService) CurrentImage(ctx context.Context, reg ImageRegistry, platformName string) (string, error)
func (*MockPlatformImageService) DeleteImages ¶
func (m *MockPlatformImageService) DeleteImages(ctx context.Context, platformName string) error
func (*MockPlatformImageService) FindImage ¶
func (m *MockPlatformImageService) FindImage(ctx context.Context, reg ImageRegistry, platformName, image string) (string, error)
func (*MockPlatformImageService) ListImages ¶
func (*MockPlatformImageService) ListImagesOrDefault ¶
func (*MockPlatformImageService) NewImage ¶
func (m *MockPlatformImageService) NewImage(ctx context.Context, reg ImageRegistry, platformName string, version int) (string, error)
func (*MockPlatformImageService) NewVersion ¶
type MockPlatformImageStorage ¶
type MockPlatformImageStorage struct { OnUpsert func(string) (*PlatformImage, error) OnFindByName func(string) (*PlatformImage, error) OnAppend func(string, int, []string) error OnDelete func(string) error }
MockPlatformStorage implements PlatformStorage interface
func (*MockPlatformImageStorage) Delete ¶
func (m *MockPlatformImageStorage) Delete(ctx context.Context, name string) error
func (*MockPlatformImageStorage) FindByName ¶
func (m *MockPlatformImageStorage) FindByName(ctx context.Context, name string) (*PlatformImage, error)
func (*MockPlatformImageStorage) Upsert ¶
func (m *MockPlatformImageStorage) Upsert(ctx context.Context, name string) (*PlatformImage, error)
type PlatformImage ¶
type PlatformImage struct { Name string Versions []RegistryVersion Count int }
type PlatformImageService ¶
type PlatformImageService interface { NewVersion(context.Context, string) (int, error) NewImage(context.Context, ImageRegistry, string, int) (string, error) CurrentImage(context.Context, ImageRegistry, string) (string, error) AppendImages(context.Context, string, int, []string) error DeleteImages(context.Context, string) error ListImages(context.Context, string) ([]string, error) ListImagesOrDefault(context.Context, string) ([]string, error) FindImage(context.Context, ImageRegistry, string, string) (string, error) }
type PlatformImageStorage ¶
type RegistryVersion ¶
Click to show internal directories.
Click to hide internal directories.