Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Mgr is a global instance of tag manager Mgr = NewManager() )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
// 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) (tags []*tag.Tag, err error)
// Get the tag specified by ID
Get(ctx context.Context, id int64) (tag *tag.Tag, err error)
// Create the tag and returns the ID
Create(ctx context.Context, tag *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.Tag, props ...string) (err error)
// Delete the tag specified by ID
Delete(ctx context.Context, id int64) (err error)
// DeleteOfArtifact deletes all tags attached to the artifact
DeleteOfArtifact(ctx context.Context, artifactID int64) (err error)
}
Manager manages the tags
func NewManager ¶
func NewManager() Manager
NewManager creates an instance of the default tag manager
Click to show internal directories.
Click to hide internal directories.