Documentation ¶
Index ¶
- Constants
- type Member
- type MemberQuery
- type NamesQuery
- type Project
- func (p *Project) AutoSBOMGen() bool
- func (p *Project) AutoScan() bool
- func (p *Project) ContentTrustCosignEnabled() bool
- func (p *Project) ContentTrustEnabled() bool
- func (p *Project) FilterByMember(_ context.Context, qs orm.QuerySeter, _ string, value interface{}) orm.QuerySeter
- func (p *Project) FilterByNames(_ context.Context, qs orm.QuerySeter, _ string, value interface{}) orm.QuerySeter
- func (p *Project) FilterByOwner(_ context.Context, qs orm.QuerySeter, _ string, value interface{}) orm.QuerySeter
- func (p *Project) FilterByPublic(_ context.Context, qs orm.QuerySeter, _ string, value interface{}) orm.QuerySeter
- func (p *Project) GetMetadata(key string) (string, bool)
- func (p *Project) IsProxy() bool
- func (p *Project) IsPublic() bool
- func (p *Project) ProxyCacheSpeed() int32
- func (p *Project) ReuseSysCVEAllowlist() bool
- func (p *Project) SetMetadata(key, value string)
- func (p *Project) Severity() string
- func (p *Project) TableName() string
- func (p *Project) VulPrevented() bool
- type Projects
Constants ¶
View Source
const ( ProMetaPublic = "public" ProMetaEnableContentTrust = "enable_content_trust" ProMetaEnableContentTrustCosign = "enable_content_trust_cosign" ProMetaPreventVul = "prevent_vul" // prevent vulnerable images from being pulled ProMetaSeverity = "severity" ProMetaAutoScan = "auto_scan" ProMetaReuseSysCVEAllowlist = "reuse_sys_cve_allowlist" ProMetaAutoSBOMGen = "auto_sbom_generation" ProMetaProxySpeed = "proxy_speed_kb" )
keys of project metadata and severity values
View Source
const ( // ProjectTable is the table name for project ProjectTable = "project" // ProjectPublic means project is public ProjectPublic = "public" // ProjectPrivate means project is private ProjectPrivate = "private" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Member ¶
type Member struct { ID int `orm:"pk;auto;column(id)" json:"id"` ProjectID int64 `orm:"column(project_id)" json:"project_id"` Role int `orm:"column(role)" json:"role_id"` EntityID int `orm:"column(entity_id)" json:"entity_id"` EntityType string `orm:"column(entity_type)" json:"entity_type"` 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"` }
Member holds the details of a member.
type MemberQuery ¶
type MemberQuery struct { UserID int // the user id Name string // the username of member Role int // the role of the member has to the project GroupIDs []int // the group ID of current user belongs to WithPublic bool // include the public projects for the member }
MemberQuery ...
type NamesQuery ¶
type NamesQuery struct { Names []string // the names of project WithPublic bool // include the public projects }
NamesQuery ...
type Project ¶
type Project struct { ProjectID int64 `orm:"pk;auto;column(project_id)" json:"project_id"` OwnerID int `orm:"column(owner_id)" json:"owner_id"` Name string `orm:"column(name)" json:"name" sort:"default"` 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"` OwnerName string `orm:"-" json:"owner_name"` Role int `orm:"-" json:"current_user_role_id"` RoleList []int `orm:"-" json:"current_user_role_ids"` RepoCount int64 `orm:"-" json:"repo_count"` Metadata map[string]string `orm:"-" json:"metadata"` CVEAllowlist allowlist.CVEAllowlist `orm:"-" json:"cve_allowlist"` RegistryID int64 `orm:"column(registry_id)" json:"registry_id"` }
Project holds the details of a project.
func (*Project) ContentTrustCosignEnabled ¶
VulPrevented ...
func (*Project) ContentTrustEnabled ¶
ContentTrustEnabled ...
func (*Project) FilterByMember ¶
func (p *Project) FilterByMember(_ context.Context, qs orm.QuerySeter, _ string, value interface{}) orm.QuerySeter
FilterByMember returns orm.QuerySeter with member filter
func (*Project) FilterByNames ¶
func (p *Project) FilterByNames(_ context.Context, qs orm.QuerySeter, _ string, value interface{}) orm.QuerySeter
FilterByNames returns orm.QuerySeter with name filter
func (*Project) FilterByOwner ¶
func (p *Project) FilterByOwner(_ context.Context, qs orm.QuerySeter, _ string, value interface{}) orm.QuerySeter
FilterByOwner returns orm.QuerySeter with owner filter
func (*Project) FilterByPublic ¶
func (p *Project) FilterByPublic(_ context.Context, qs orm.QuerySeter, _ string, value interface{}) orm.QuerySeter
FilterByPublic returns orm.QuerySeter with public filter
func (*Project) GetMetadata ¶
GetMetadata ...
func (*Project) ReuseSysCVEAllowlist ¶
ReuseSysCVEAllowlist ...
Click to show internal directories.
Click to hide internal directories.