Documentation
¶
Index ¶
- Constants
- type Database
- type Query
- func (q *Query) AnnotationExists(annotation string) *Query
- func (q *Query) AnnotationIs(annotation string, value string) *Query
- func (q *Query) AnnotationMatches(annotation string, pattern string) *Query
- func (q *Query) Architecture(architecture string) *Query
- func (q *Query) LabelExists(label string) *Query
- func (q *Query) LabelIs(label string, value string) *Query
- func (q *Query) LabelMatches(label string, pattern string) *Query
- func (q *Query) OS(os string) *Query
- func (q *Query) Repository(repository string) *Query
- func (q *Query) Tag(tag string) *Query
- func (q *Query) TagMatches(tag string) *Query
- type QueryTerm
- type QueryType
- type Tx
Constants ¶
View Source
const ( QueryIs = iota QueryExists QueryMatches )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface {
Begin(ctx context.Context) (Tx, error)
// Convenience
DoQuery(ctx context.Context, query *Query) ([]*flagstate.Repository, error)
ModificationTime() (time.Time, error)
}
func NewPostgresDB ¶
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (*Query) AnnotationExists ¶
func (*Query) AnnotationMatches ¶
func (*Query) Architecture ¶
func (*Query) LabelExists ¶
func (*Query) Repository ¶
func (*Query) TagMatches ¶
type Tx ¶
type Tx interface {
Commit() error
Rollback() error
Modified() (bool, time.Time)
DoQuery(query *Query) ([]*flagstate.Repository, error)
StoreImage(repository string, image *flagstate.TaggedImage) error
StoreImageList(repository string, list *flagstate.TaggedImageList) error
SetImageTags(repository string, dgst digest.Digest, tags []string) error
SetImageListTags(repository string, dgst digest.Digest, tags []string) error
DeleteImage(repository string, dgst digest.Digest) error
DeleteImageList(repository string, dgst digest.Digest) error
DeleteMissingRepos(allRepos map[string]bool) error
DeleteUnused() error
}
Click to show internal directories.
Click to hide internal directories.