model

package
v0.0.0-...-d01dfd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accessory

type Accessory struct {
	model.AccessoryData
}

Accessory model

func NewAccessory

func NewAccessory(a model.AccessoryData) *Accessory

NewAccessory ...

func (*Accessory) ToSwagger

func (a *Accessory) ToSwagger() *models.Accessory

ToSwagger converts the label to the swagger model

type AdditionLink struct {
	*artifact.AdditionLink
}

AdditionLink is a link via that the addition can be fetched

func NewAdditionLink(a *artifact.AdditionLink) *AdditionLink

NewAdditionLink ...

func (*AdditionLink) ToSwagger

func (a *AdditionLink) ToSwagger() models.AdditionLink

ToSwagger converts the addition link to the swagger model

type Artifact

type Artifact struct {
	artifact.Artifact
	// TODO: rename to VulOverview
	ScanOverview map[string]interface{} `json:"scan_overview"`
	SBOMOverView map[string]interface{} `json:"sbom_overview"`
}

Artifact model

func (*Artifact) ToSwagger

func (a *Artifact) ToSwagger() *models.Artifact

ToSwagger converts the artifact to the swagger model

type CVEAllowlist

type CVEAllowlist struct {
	*models.CVEAllowlist
}

CVEAllowlist model

func NewCVEAllowlist

func NewCVEAllowlist(l *models.CVEAllowlist) *CVEAllowlist

NewCVEAllowlist ...

func (*CVEAllowlist) ToSwagger

func (l *CVEAllowlist) ToSwagger() *svrmodels.CVEAllowlist

ToSwagger converts the model to swagger model

type ExecHistory

type ExecHistory struct {
	Schedule     *ScheduleParam `json:"schedule"`
	ID           int64          `json:"id"`
	Name         string         `json:"job_name"`
	Kind         string         `json:"job_kind"`
	Parameters   string         `json:"job_parameters"`
	Status       string         `json:"job_status"`
	UUID         string         `json:"-"`
	Deleted      bool           `json:"deleted"`
	CreationTime time.Time      `json:"creation_time"`
	UpdateTime   time.Time      `json:"update_time"`
}

ExecHistory execution history

func (*ExecHistory) ToSwagger

func (h *ExecHistory) ToSwagger() *models.ExecHistory

ToSwagger converts the history to the swagger model

type GCHistory

type GCHistory struct {
	Schedule     *ScheduleParam `json:"schedule"`
	ID           int64          `json:"id"`
	Name         string         `json:"job_name"`
	Kind         string         `json:"job_kind"`
	Parameters   string         `json:"job_parameters"`
	Status       string         `json:"job_status"`
	UUID         string         `json:"-"`
	Deleted      bool           `json:"deleted"`
	CreationTime time.Time      `json:"creation_time"`
	UpdateTime   time.Time      `json:"update_time"`
}

GCHistory gc execution history

func (*GCHistory) ToSwagger

func (h *GCHistory) ToSwagger() *models.GCHistory

ToSwagger converts the history to the swagger model

type GCSchedule

type GCSchedule struct {
	*scheduler.Schedule
}

GCSchedule ...

func NewGCSchedule

func NewGCSchedule(s *scheduler.Schedule) *GCSchedule

NewGCSchedule ...

func (*GCSchedule) ToSwagger

func (s *GCSchedule) ToSwagger() *models.GCHistory

ToSwagger converts the schedule to the swagger model

type ImmutableRule

type ImmutableRule struct {
	*pkg_model.Metadata
}

ImmutableRule ...

func NewImmutableRule

func NewImmutableRule(meta *pkg_model.Metadata) *ImmutableRule

NewImmutableRule ...

func (*ImmutableRule) ToScopeSelectors

func (ir *ImmutableRule) ToScopeSelectors() map[string][]models.ImmutableSelector

ToScopeSelectors ...

func (*ImmutableRule) ToSwagger

func (ir *ImmutableRule) ToSwagger() *models.ImmutableRule

ToSwagger ...

func (*ImmutableRule) ToTagSelectors

func (ir *ImmutableRule) ToTagSelectors() []*models.ImmutableSelector

ToTagSelectors ...

type Label

type Label struct {
	*model.Label
}

Label model

func NewLabel

func NewLabel(l *model.Label) *Label

NewLabel ...

func (*Label) ToSwagger

func (l *Label) ToSwagger() *models.Label

ToSwagger converts the label to the swagger model

type Option

type Option func(*OverviewOptions)

Option define the func to build options

func WithSBOM

func WithSBOM(enable bool) Option

WithSBOM set the option to query SBOM info

func WithVuln

func WithVuln(enable bool) Option

WithVuln set the option to query vulnerability info

type OverviewOptions

type OverviewOptions struct {
	WithVuln bool
	WithSBOM bool
}

OverviewOptions define the option to query overview info

func NewOverviewOptions

func NewOverviewOptions(options ...Option) *OverviewOptions

NewOverviewOptions create a new OverviewOptions

type Project

type Project struct {
	*project.Project
}

Project model

func NewProject

func NewProject(p *project.Project) *Project

NewProject ...

func (*Project) ToSwagger

func (p *Project) ToSwagger() *models.Project

ToSwagger converts the project to the swagger model

type Quota

type Quota struct {
	*quota.Quota
}

Quota model

func NewQuota

func NewQuota(quota *quota.Quota) *Quota

NewQuota new quota instance

func (*Quota) ToSwagger

func (q *Quota) ToSwagger(ctx context.Context) *models.Quota

ToSwagger converts the quota to the swagger model

type Reference

type Reference struct {
	*pkg_art.Reference
}

Reference records the child artifact referenced by parent artifact

func NewReference

func NewReference(r *pkg_art.Reference) *Reference

NewReference ...

func (*Reference) ToSwagger

func (r *Reference) ToSwagger() *models.Reference

ToSwagger converts the reference to the swagger model

type RepoRecord

type RepoRecord struct {
	*model.RepoRecord
}

RepoRecord model

func NewRepoRecord

func NewRepoRecord(r *model.RepoRecord) *RepoRecord

NewRepoRecord ...

func (*RepoRecord) ToSwagger

func (r *RepoRecord) ToSwagger() *models.Repository

ToSwagger converts the repository into the swagger model

type ResourceList

type ResourceList struct {
	types.ResourceList
}

ResourceList model

func NewResourceList

func NewResourceList(rl types.ResourceList) *ResourceList

NewResourceList new resource list instance

func (*ResourceList) ToSwagger

func (rl *ResourceList) ToSwagger() models.ResourceList

ToSwagger converts the resource list to the swagger model

type RetentionExec

type RetentionExec struct {
	*retention.Execution
}

RetentionExec ...

func NewRetentionExec

func NewRetentionExec(exec *retention.Execution) *RetentionExec

NewRetentionExec ...

func (*RetentionExec) ToSwagger

func (e *RetentionExec) ToSwagger() *models.RetentionExecution

ToSwagger ...

type RetentionPolicy

type RetentionPolicy struct {
	*policy.Metadata
}

RetentionPolicy ...

func NewRetentionPolicy

func NewRetentionPolicy(policy *policy.Metadata) *RetentionPolicy

NewRetentionPolicy ...

func NewRetentionPolicyFromSwagger

func NewRetentionPolicyFromSwagger(policy *models.RetentionPolicy) *RetentionPolicy

NewRetentionPolicyFromSwagger ...

func (*RetentionPolicy) ToSwagger

func (s *RetentionPolicy) ToSwagger() *models.RetentionPolicy

ToSwagger ...

type RetentionTask

type RetentionTask struct {
	*retention.Task
}

RetentionTask ...

func NewRetentionTask

func NewRetentionTask(task *retention.Task) *RetentionTask

NewRetentionTask ...

func (*RetentionTask) ToSwagger

ToSwagger ...

type Robot

type Robot struct {
	*robot.Robot
}

Robot ...

func NewRobot

func NewRobot(r *robot.Robot) *Robot

NewRobot ...

func (*Robot) ToSwagger

func (r *Robot) ToSwagger() *models.Robot

ToSwagger ...

type ScannerMetadata

type ScannerMetadata struct {
	*v1.ScannerAdapterMetadata
}

ScannerMetadata ...

func NewScannerMetadata

func NewScannerMetadata(md *v1.ScannerAdapterMetadata) *ScannerMetadata

NewScannerMetadata ...

func (*ScannerMetadata) ToSwagger

ToSwagger ...

type ScannerRegistration

type ScannerRegistration struct {
	*scanner.Registration
}

ScannerRegistration ...

func NewScannerRegistration

func NewScannerRegistration(scanner *scanner.Registration) *ScannerRegistration

NewScannerRegistration ...

func (*ScannerRegistration) ToSwagger

ToSwagger ...

type Schedule

type Schedule struct {
	*scheduler.Schedule
}

Schedule model

func NewSchedule

func NewSchedule(schedule *scheduler.Schedule) *Schedule

NewSchedule new schedule instance

func (*Schedule) ToSwagger

func (s *Schedule) ToSwagger() *models.Schedule

ToSwagger converts the schedule to the swagger model

type ScheduleParam

type ScheduleParam struct {
	// Daily, Weekly, Custom, Manual, None
	Type string `json:"type"`
	// The cron string of scheduled job
	Cron string `json:"cron"`
}

ScheduleParam defines the parameter of schedule trigger

type Tag

type Tag struct {
	*tag.Tag
}

Tag model

func NewTag

func NewTag(t *tag.Tag) *Tag

NewTag ...

func (*Tag) ToSwagger

func (t *Tag) ToSwagger() *models.Tag

ToSwagger converts the tag to the swagger model

type User

type User struct {
	*comModels.User
}

User ...

func (*User) ToSearchRespItem

func (u *User) ToSearchRespItem() *svrmodels.UserSearchRespItem

ToSearchRespItem ...

func (*User) ToUserProfile

func (u *User) ToUserProfile() *svrmodels.UserProfile

ToUserProfile ...

func (*User) ToUserResp

func (u *User) ToUserResp() *svrmodels.UserResp

ToUserResp ...

type WebhookJob

type WebhookJob struct {
	*task.Execution
}

WebhookJob ...

func NewWebhookJob

func NewWebhookJob(exec *task.Execution) *WebhookJob

NewWebhookJob ...

func (*WebhookJob) ToSwagger

func (n *WebhookJob) ToSwagger() *models.WebhookJob

ToSwagger ...

type WebhookPolicy

type WebhookPolicy struct {
	*model.Policy
}

WebhookPolicy ...

func NewWebhookPolicy

func NewWebhookPolicy(p *model.Policy) *WebhookPolicy

NewWebhookPolicy ...

func (*WebhookPolicy) ToSwagger

func (n *WebhookPolicy) ToSwagger() *models.WebhookPolicy

ToSwagger ...

func (*WebhookPolicy) ToTargets

func (n *WebhookPolicy) ToTargets() []*models.WebhookTargetObject

ToTargets ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL