Documentation ¶
Index ¶
- func ParseMetadataListFromParams(p params.CloudImageMetadataList, cfg *config.Config) []cloudimagemetadata.Metadata
- func Register(registry facade.FacadeRegistry)
- func Save(ctx context.Context, service ModelConfigService, saver ImageMetadataSaver, ...) ([]params.ErrorResult, error)
- type API
- func (api *API) Delete(ctx context.Context, images params.MetadataImageIds) (params.ErrorResults, error)
- func (api *API) List(ctx context.Context, filter params.ImageMetadataFilter) (params.ListCloudImageMetadataResult, error)
- func (api *API) Save(ctx context.Context, metadata params.MetadataSaveParams) (params.ErrorResults, error)
- type ImageMetadataSaver
- type MetadataService
- type ModelConfigService
- type ModelInfoService
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 ¶
func Save( ctx context.Context, service ModelConfigService, saver ImageMetadataSaver, metadata params.MetadataSaveParams, ) ([]params.ErrorResult, error)
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 ¶
func (api *API) List(ctx context.Context, filter params.ImageMetadataFilter) (params.ListCloudImageMetadataResult, error)
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 ¶
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.