Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FilterTypeRepository represents the repository filter type FilterTypeRepository FilterType = "repository" // FilterTypeTag represents the tag filter type FilterTypeTag FilterType = "tag" // FilterTypeSignature represents the signature filter type FilterTypeSignature FilterType = "signature" // FilterTypeVulnerability represents the vulnerability filter type FilterTypeVulnerability FilterType = "vulnerability" // FilterTypeLabel represents the label filter type FilterTypeLabel FilterType = "label" // TriggerTypeManual represents the manual trigger type TriggerTypeManual TriggerType = "manual" // TriggerTypeScheduled represents the scheduled trigger type TriggerTypeScheduled TriggerType = "scheduled" // TriggerTypeEventBased represents the event_based trigger type TriggerTypeEventBased TriggerType = "event_based" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { Type FilterType `json:"type"` Value interface{} `json:"value"` }
Filter holds the info of the filter
type Schema ¶
type Schema struct { ID int64 `orm:"column(id)" json:"id"` Name string `orm:"column(name)" json:"name"` Description string `orm:"column(description)" json:"description"` // use project id ProjectID int64 `orm:"column(project_id)" json:"project_id"` ProviderID int64 `orm:"column(provider_id)" json:"provider_id"` Filters []*Filter `orm:"-" json:"filters"` // Use JSON data format (query by filter type should be supported) FiltersStr string `orm:"column(filters)" json:"-"` Trigger *Trigger `orm:"-" json:"trigger"` // Use JSON data format (query by trigger type should be supported) TriggerStr string `orm:"column(trigger)" json:"-"` Enabled bool `orm:"column(enabled)" json:"enabled"` CreatedAt time.Time `orm:"column(creation_time)" json:"creation_time"` UpdatedTime time.Time `orm:"column(update_time)" json:"update_time"` }
Schema defines p2p preheat policy schema
func (*Schema) GetDefaultSorts ¶
GetDefaultSorts specifies the default sorts
type Trigger ¶
type Trigger struct { // The preheat policy trigger type. The valid values ar manual, scheduled. Type TriggerType `json:"type"` Settings struct { // The cron string for scheduled trigger. Cron string `json:"cron,omitempty"` } `json:"trigger_setting,omitempty"` }
Trigger holds the trigger info.
Click to show internal directories.
Click to hide internal directories.