state

package
v0.0.0-...-c030021 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	*domain.StateBase
	// contains filtered or unexported fields
}

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

func (s *State) RemoveContainerImageMetadata(ctx context.Context, storageKey string) error

RemoveContainerImageMetadata removes a container image metadata resource from storage. containerimageresourcestoreerrors.ContainerImageMetadataNotFound is returned if the resource does not exist.

Jump to

Keyboard shortcuts

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