Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Ctl is a global tag controller instance Ctl = NewController() )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { // Ensure Ensure(ctx context.Context, repositoryID, artifactID int64, name string) (int64, error) // Count returns the total count of tags according to the query. Count(ctx context.Context, query *q.Query) (total int64, err error) // List tags according to the query List(ctx context.Context, query *q.Query, option *Option) (tags []*Tag, err error) // Get the tag specified by ID Get(ctx context.Context, id int64, option *Option) (tag *Tag, err error) // Create the tag and returns the ID Create(ctx context.Context, tag *Tag) (id int64, err error) // Update the tag. Only the properties specified by "props" will be updated if it is set Update(ctx context.Context, tag *Tag, props ...string) (err error) // Delete the tag specified by ID with limitation check Delete(ctx context.Context, id int64) (err error) // DeleteTags deletes all tags DeleteTags(ctx context.Context, ids []int64) (err error) }
Controller manages the tags
func NewController ¶
func NewController() Controller
NewController creates an instance of the default repository controller
Click to show internal directories.
Click to hide internal directories.