Documentation ¶
Index ¶
Constants ¶
const RepoTable = "repository"
RepoTable is the table name for repository
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionLink ¶
type AdditionLink struct { HREF string `json:"href"` Absolute bool `json:"absolute"` // specify the href is an absolute URL or not }
AdditionLink is a link via that the addition can be fetched
type Artifact ¶
type Artifact struct { artifact.Artifact Tags []*tag.Tag `json:"tags"` // the list of tags that attached to the artifact AdditionLinks map[string]*AdditionLink `json:"addition_links"` // the resource link for build history(image), values.yaml(chart), dependency(chart), etc Labels []*Label `json:"labels"` }
type Label ¶
type Label struct { ID int64 `orm:"pk;auto;column(id)" json:"id"` Name string `orm:"column(name)" json:"name"` Description string `orm:"column(description)" json:"description"` Color string `orm:"column(color)" json:"color"` Level string `orm:"column(level)" json:"-"` Scope string `orm:"column(scope)" json:"scope"` ProjectID int64 `orm:"column(project_id)" json:"project_id"` CreationTime time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time"` UpdateTime time.Time `orm:"column(update_time);auto_now" json:"update_time"` Deleted bool `orm:"column(deleted)" json:"deleted"` }
Label holds information used for a label
type LabelQuery ¶
type LabelQuery struct { Name string FuzzyMatchName bool // the property is used to determine the query for lable name is fuzzy matching or exaxt matching Level string Scope string ProjectID int64 Pagination }
LabelQuery : query parameters for labels
type RepoRecord ¶
type RepoRecord struct { RepositoryID int64 `orm:"pk;auto;column(repository_id)" json:"repository_id"` Name string `orm:"column(name)" json:"name"` ProjectID int64 `orm:"column(project_id)" json:"project_id"` Description string `orm:"column(description)" json:"description"` PullCount int64 `orm:"column(pull_count)" json:"pull_count"` ArtifactCount int64 `orm:"column(artifact_count)" json:"artifact_count"` CreationTime time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time" sort:"default:desc"` UpdateTime time.Time `orm:"column(update_time);auto_now" json:"update_time"` }
RepoRecord holds the record of an repository in DB, all the infors are from the registry notification event.
func (*RepoRecord) TableName ¶
func (r *RepoRecord) TableName() string
TableName is required by by beego orm to map RepoRecord to table repository
type RepositoryQuery ¶
type RepositoryQuery struct { Name string ProjectIDs []int64 ProjectName string LabelID int64 Pagination Sorting }
RepositoryQuery : query parameters for repository
type ResourceLabel ¶
type ResourceLabel struct { ID int64 `orm:"pk;auto;column(id)"` LabelID int64 `orm:"column(label_id)"` ResourceID int64 `orm:"column(resource_id)"` ResourceName string `orm:"column(resource_name)"` ResourceType string `orm:"column(resource_type)"` CreationTime time.Time `orm:"column(creation_time);auto_now_add"` UpdateTime time.Time `orm:"column(update_time);auto_now"` }
ResourceLabel records the relationship between resource and label
type ResourceLabelQuery ¶
type ResourceLabelQuery struct { LabelID int64 ResourceID int64 ResourceName string ResourceType string }
ResourceLabelQuery : query parameters for the mapping relationships of resource and label
type Sorting ¶
type Sorting struct {
Sort string // in format [+-]?<FIELD_NAME>, e.g. '+creation_time', '-creation_time'
}
Sorting sort by given field, ascending or descending
type TagDetail ¶
type TagDetail struct { Digest string `json:"digest"` Name string `json:"name"` Size int64 `json:"size"` Architecture string `json:"architecture"` OS string `json:"os"` OSVersion string `json:"os.version"` DockerVersion string `json:"docker_version"` Author string `json:"author"` Created time.Time `json:"created"` Config *TagCfg `json:"config"` Immutable bool `json:"immutable"` }
TagDetail ...
type TagResp ¶
type TagResp struct { TagDetail Signature *model.Target `json:"signature"` ScanOverview map[string]interface{} `json:"scan_overview,omitempty"` Labels []*Label `json:"labels"` PushTime time.Time `json:"push_time"` PullTime time.Time `json:"pull_time"` }
TagResp holds the information of one image tag