Documentation
¶
Index ¶
- type State
- func (s *State) GetContainerImageMetadata(ctx context.Context, storageKey string) (containerimageresourcestore.ContainerImageMetadata, error)
- func (s *State) PutContainerImageMetadata(ctx context.Context, storageKey string, ...) (store.ID, error)
- func (s *State) RemoveContainerImageMetadata(ctx context.Context, storageKey string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
func NewState ¶
func NewState(factory database.TxnRunnerFactory, logger logger.Logger) *State
NewState returns a new state reference.
func (*State) GetContainerImageMetadata ¶
func (s *State) GetContainerImageMetadata( ctx context.Context, storageKey string, ) (containerimageresourcestore.ContainerImageMetadata, error)
GetContainerImageMetadata returns the container image metadata with the given UUID. containerimageresourcestoreerrors.ContainerImageMetadataNotFound is returned if the UUID is not in the table.
func (*State) PutContainerImageMetadata ¶
func (s *State) PutContainerImageMetadata( ctx context.Context, storageKey string, registryPath, userName, password string, ) (store.ID, error)
PutContainerImageMetadata stores container image metadata the database and returns its UUID. If an image is already stored under the storage key, it returns: - containerimageresourcestoreerrors.ContainerImageMetadataAlreadyStored
func (*State) RemoveContainerImageMetadata ¶
RemoveContainerImageMetadata removes a container image metadata resource from storage. containerimageresourcestoreerrors.ContainerImageMetadataNotFound is returned if the resource does not exist.