accessory

package
v0.0.0-...-66c98c8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Mgr is a global artifact manager instance
	Mgr = NewManager()
)

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Ensure ...
	Ensure(ctx context.Context, subArtDigest, subArtRepo string, subArtID, artifactID, size int64, digest, accType string) error
	// Get the artifact specified by the ID
	Get(ctx context.Context, id int64) (accessory model.Accessory, err error)
	// Count returns the total count of accessory according to the query.
	Count(ctx context.Context, query *q.Query) (total int64, err error)
	// List accessory according to the query
	List(ctx context.Context, query *q.Query) (accs []model.Accessory, err error)
	// Create the accessory and returns the ID
	Create(ctx context.Context, accessory model.AccessoryData) (id int64, err error)
	// Update the accessory
	Update(ctx context.Context, accessory model.AccessoryData) error
	// Delete the accessory specified by ID
	Delete(ctx context.Context, id int64) (err error)
	// DeleteAccessories deletes accessories according to the query
	DeleteAccessories(ctx context.Context, q *q.Query) (err error)
}

Manager is the only interface of artifact module to provide the management functions for artifacts

func NewManager

func NewManager() Manager

NewManager returns an instance of the default manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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