imagemetadatamanager

package
v0.0.0-...-0a82276 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMetadataListFromParams

func ParseMetadataListFromParams(p params.CloudImageMetadataList, cfg *config.Config) []cloudimagemetadata.Metadata

ParseMetadataListFromParams translates params.CloudImageMetadataList into a collection of cloudimagemetadata.Metadata.

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

func Save

Save stores given cloud image metadata using given persistence interface.

Types

type API

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

API is the concrete implementation of the API endpoint for cloud image metadata manipulations.

func (*API) Delete

func (api *API) Delete(ctx context.Context, images params.MetadataImageIds) (params.ErrorResults, error)

Delete deletes cloud image metadata for given image ids. It supports bulk calls.

func (*API) List

List returns all found cloud image metadata that satisfy given filter. Returned list contains metadata ordered by priority.

func (*API) Save

func (api *API) Save(ctx context.Context, metadata params.MetadataSaveParams) (params.ErrorResults, error)

Save stores given cloud image metadata. It supports bulk calls.

type ImageMetadataSaver

type ImageMetadataSaver interface {
	// SaveMetadata persists collection of given images metadata.
	SaveMetadata(context.Context, []cloudimagemetadata.Metadata) error
}

ImageMetadataSaver is an interface for manipulating images metadata.

type MetadataService

type MetadataService interface {

	// SaveMetadata saves the provided list of cloud image metadata to the storage.
	SaveMetadata(ctx context.Context, metadata []cloudimagemetadata.Metadata) error

	// DeleteMetadataWithImageID deletes the metadata associated with the specified image ID.
	DeleteMetadataWithImageID(ctx context.Context, imageID string) error

	// FindMetadata retrieves cloud image metadata based on provided filter criteria.
	// It returns a map of metadata grouped by source.
	FindMetadata(ctx context.Context, criteria cloudimagemetadata.MetadataFilter) (map[string][]cloudimagemetadata.Metadata, error)
}

MetadataService defines methods to access and manipulate cloud image metadata.

type ModelConfigService

type ModelConfigService interface {
	ModelConfig(ctx context.Context) (*config.Config, error)
}

ModelConfigService is an interface that provides access to model config.

type ModelInfoService

type ModelInfoService interface {
	// GetModelInfo returns the information associated with the current model.
	GetModelInfo(context.Context) (coremodel.ReadOnlyModel, error)
}

ModelInfoService is a service for interacting with the data that describes the current model being worked on.

Jump to

Keyboard shortcuts

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