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
Click to show internal directories.
Click to hide internal directories.