Documentation ¶
Index ¶
- type Adapter
- type AdapterGetRequest
- type AdapterGetResponse
- type AdapterSaveRequest
- type ArtifactLogRequest
- type CodeScan
- type CodeScanComponent
- type CodeScanIssue
- type CodeScanRequest
- type Component
- type ComponentGetRequest
- type ComponentGetResponse
- type ComponentVulnerability
- type ComponentVulnerabilityRequest
- type EventGetRequest
- type EventGetResponse
- type EventSaveRequest
- type License
- type Order
- type OrderDirection
- type OrderField
- type Project
- type ProjectCreateRequest
- type ProjectGetRequest
- type ProjectGetResponse
- type Release
- type ReleaseCreateRequest
- type ReleaseGetByIDRequest
- type ReleaseGetByIDResponse
- type ReleaseGetRequest
- type ReleaseGetResponse
- type ReleasePolicy
- type ReleasePolicyAffects
- type ReleasePolicyAffectsSet
- type ReleasePolicyCreate
- type ReleasePolicyGetRequest
- type ReleasePolicyGetResponse
- type ReleasePolicySaveRequest
- type ReleasePolicyUpdate
- type ReleasePolicyUpdateRequest
- type TestRun
- type TestRunCase
- type TestRunRequest
- type Vulnerability
- type VulnerabilityPatch
- type VulnerabilityReview
- type VulnerabilityReviewAffects
- type VulnerabilityReviewGetRequest
- type VulnerabilityReviewGetResponse
- type VulnerabilityReviewSaveRequest
- type VulnerabilityReviewUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
ent.AdapterModelRead
}
type AdapterGetRequest ¶
type AdapterGetResponse ¶
type AdapterGetResponse struct {
Adapters []*Adapter `json:"adapters,omitempty"`
}
type AdapterSaveRequest ¶
type AdapterSaveRequest struct {
Adapter *ent.AdapterModelCreate `json:"adapter,omitempty" validate:"required"`
}
type ArtifactLogRequest ¶
type ArtifactLogRequest struct { Artifact *ent.ArtifactModelCreate `json:"artifact,omitempty"` Commit *string `json:"commit,omitempty"` }
type CodeScan ¶
type CodeScan struct { ent.CodeScanModelCreate `json:"code_scan" validate:"required" mapstructure:",squash"` Issues []*CodeScanIssue `json:"issues,omitempty" validate:"dive,required"` Components []*CodeScanComponent `json:"components,omitempty" validate:"dive,required"` }
type CodeScanComponent ¶
type CodeScanComponent struct { ent.ComponentModelCreate `validate:"required" mapstructure:",squash"` Vulnerabilities []*Vulnerability `json:"vulnerabilities" validate:"dive,required" mapstructure:"vulnerabilities"` Licenses []*License `json:"licenses" validate:"dive,required" mapstructure:"licenses"` }
type CodeScanIssue ¶
type CodeScanIssue struct {
ent.CodeIssueModelCreate `validate:"required" mapstructure:",squash"`
}
type CodeScanRequest ¶
type Component ¶
type Component struct {
ent.ComponentModelRead `validate:"required"`
}
type ComponentGetRequest ¶
type ComponentGetRequest struct { }
type ComponentGetResponse ¶
type ComponentGetResponse struct {
Components []*Component
}
type ComponentVulnerability ¶
type ComponentVulnerability struct { ComponentID *int `json:"component_id" validate:"required"` Vulnerabilities []*Vulnerability `json:"vulnerabilities,omitempty" validate:"dive,required"` }
type ComponentVulnerabilityRequest ¶
type ComponentVulnerabilityRequest struct { DataSource *string `json:"data_source,omitempty" validate:"required"` Components []*ComponentVulnerability `json:"components,omitempty" validate:"required,dive,required"` }
type EventGetRequest ¶
type EventGetRequest struct { Project string `json:"project,omitempty" query:"project" mapstructure:"project,omitempty"` Repo string `json:"repo,omitempty" query:"repo" mapstructure:"repo,omitempty"` ReleaseName string `json:"release_name,omitempty" query:"release_name" mapstructure:"release_name,omitempty"` ReleaseVersion string `json:"release_version,omitempty" query:"release_version" mapstructure:"release_version,omitempty"` Commit string `json:"commit,omitempty" query:"commit" mapstructure:"commit,omitempty"` Last string `json:"last,omitempty" query:"last" mapstructure:"last,omitempty" validate:"number"` }
type EventGetResponse ¶
type EventSaveRequest ¶
type EventSaveRequest struct { Event *ent.EventModelCreate `json:"event,omitempty" validate:"required"` ReleaseID *int `json:"release_id,omitempty"` RepoID *int `json:"repo_id,omitempty"` ProjectID *int `json:"project_id,omitempty"` }
type License ¶
type License struct {
ent.LicenseModelCreate `validate:"required" mapstructure:",squash"`
}
type Order ¶
type Order struct { Field string `query:"sort_by"` Direction OrderDirection `query:"order"` }
func OrderFromSortBy ¶
type OrderDirection ¶
type OrderDirection string
const ( OrderDirectionAsc OrderDirection = "asc" OrderDirectionDesc OrderDirection = "desc" )
func (OrderDirection) String ¶
func (o OrderDirection) String() string
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
type OrderField ¶
type OrderField string
func (OrderField) String ¶
func (o OrderField) String() string
type Project ¶
type Project struct {
ent.ProjectModelRead
}
type ProjectCreateRequest ¶
type ProjectCreateRequest struct {
Project *ent.ProjectModelCreate `json:"project,omitempty" validate:"required"`
}
type ProjectGetRequest ¶
type ProjectGetRequest struct {
Name string `query:"name"`
}
type ProjectGetResponse ¶
type ProjectGetResponse struct {
Projects []*Project `json:"projects"`
}
type Release ¶
type Release struct { Project *ent.ProjectModelRead `json:"project,omitempty" validate:"required"` Repo *ent.RepoModelRead `json:"repo,omitempty" validate:"required"` Commit *ent.GitCommitModelRead `json:"commit,omitempty" validate:"required"` Release *ent.ReleaseModelRead `json:"release,omitempty" validate:"required"` Policies []*ent.ReleasePolicyModelRead `json:"policies,omitempty" validate:"dive,required"` Violations []*ent.ReleasePolicyViolationModelRead `json:"violations,omitempty" validate:"dive,required"` Entries []*ent.ReleaseEntryModelRead `json:"entries,omitempty" validate:"dive,required"` }
type ReleaseCreateRequest ¶
type ReleaseCreateRequest struct { Project *ent.ProjectModelCreate `json:"project,omitempty" validate:"required"` Repo *ent.RepoModelCreate `json:"repo,omitempty" validate:"required"` Commit *ent.GitCommitModelCreate `json:"commit,omitempty" validate:"required"` Release *ent.ReleaseModelCreate `json:"release,omitempty" validate:"required"` }
type ReleaseGetByIDRequest ¶
type ReleaseGetByIDRequest struct {
ID int `param:"id"`
}
type ReleaseGetByIDResponse ¶
type ReleaseGetByIDResponse struct {
Release *Release `json:"release,omitempty" validate:"required"`
}
type ReleaseGetRequest ¶
type ReleaseGetRequest struct { Commit string `json:"commit,omitempty" query:"commit"` Repos string `json:"repos,omitempty" query:"repos"` Projects string `json:"projects,omitempty" query:"projects"` Policies bool `json:"policies,string" query:"policies"` Log bool `json:"log,string" query:"log"` HeadOnly bool `json:"head_only,string" query:"head_only"` SortBy string `json:"sort_by,omitempty" query:"sort_by"` }
type ReleaseGetResponse ¶
type ReleaseGetResponse struct {
Releases []*Release `json:"releases" validate:"dive,required"`
}
type ReleasePolicy ¶
type ReleasePolicy struct { ent.ReleasePolicyModelRead Affects *ReleasePolicyAffects `json:"affects,omitempty"` }
type ReleasePolicyAffects ¶
type ReleasePolicyAffects struct { Projects []string `json:"projects,omitempty"` Repos []string `json:"repos,omitempty"` }
ReleasePolicyAffects
type ReleasePolicyAffectsSet ¶
type ReleasePolicyAffectsSet struct { Projects []string `json:"projects,omitempty"` NotProjects []string `json:"not_projects,omitempty"` Repos []string `json:"repos,omitempty"` NotRepos []string `json:"not_repos,omitempty"` }
ReleasePolicyAffectsSet defines the entities that a policy should affect. The Not will remove the entity from the policy relationship (if exists).
type ReleasePolicyCreate ¶
type ReleasePolicyCreate struct { ent.ReleasePolicyModelCreate Affects *ReleasePolicyAffectsSet `json:"affects,omitempty"` }
type ReleasePolicyGetRequest ¶
type ReleasePolicyGetResponse ¶
type ReleasePolicyGetResponse struct {
Policies []*ReleasePolicy `json:"policies"`
}
type ReleasePolicySaveRequest ¶
type ReleasePolicySaveRequest struct {
Policy *ReleasePolicyCreate `json:"policy,omitempty" validate:"required"`
}
type ReleasePolicyUpdate ¶
type ReleasePolicyUpdate struct { ent.ReleasePolicyModelUpdate Affects *ReleasePolicyAffectsSet `json:"affects,omitempty"` }
type ReleasePolicyUpdateRequest ¶
type ReleasePolicyUpdateRequest struct { ID *int `param:"id" validate:"required"` Policy *ReleasePolicyUpdate `json:"policy,omitempty" validate:"required"` }
type TestRun ¶
type TestRun struct { ent.TestRunModelCreate `mapstructure:",squash"` TestCases []*TestRunCase `json:"test_cases,omitempty" validate:"dive,required"` }
type TestRunCase ¶
type TestRunCase struct {
ent.TestCaseModelCreate `validate:"required" alias:"test_case"`
}
type TestRunRequest ¶
type Vulnerability ¶
type Vulnerability struct { ent.VulnerabilityModelCreate `validate:"required" mapstructure:",squash"` Patch *VulnerabilityPatch `json:"patch,omitempty" mapstructure:"patch"` }
type VulnerabilityPatch ¶
type VulnerabilityPatch struct {
Note *string `json:"note,omitempty" validate:"required" mapstructure:"note"`
}
type VulnerabilityReview ¶
type VulnerabilityReview struct { ent.VulnerabilityReviewModelRead Vulnerability *ent.VulnerabilityReviewModelRead Projects []*ent.ProjectModelRead Repos []*ent.RepoModelRead }
type VulnerabilityReviewAffects ¶
type VulnerabilityReviewAffects struct { Projects []string NotProjects []string Repos []string NotRepos []string Commits []string NotCommits []string }
VulnerabilityReviewAffects defines the entities that a review should affect. The Not* will remove the entity from the affects relationship (if exists).
type VulnerabilityReviewGetRequest ¶
type VulnerabilityReviewGetRequest struct { // Vulnerabilities contains a slice of vulnerability IDs. Vulnerabilities string `json:"vulnerabilities,omitempty" query:"vulnerabilities" mapstructure:"vulnerabilities"` Projects string `json:"projects,omitempty" query:"projects" mapstructure:"projects"` Repos string `json:"repos,omitempty" query:"repos" mapstructure:"repos"` Commit string `json:"commit,omitempty" query:"commit" mapstructure:"commit"` WithProjects bool `json:"with_projects,omitempty" query:"with_projects" mapstructure:"with_projects"` WithRepos bool `json:"with_repos,omitempty" query:"with_repos" mapstructure:"with_repos"` }
type VulnerabilityReviewGetResponse ¶
type VulnerabilityReviewGetResponse struct {
Reviews []*VulnerabilityReview
}
type VulnerabilityReviewSaveRequest ¶
type VulnerabilityReviewSaveRequest struct { Review *ent.VulnerabilityReviewModelCreate `json:"review,omitempty" validate:"required"` VulnerabilityID *string `json:"vulnerability_id,omitempty" validate:"required"` Affects *VulnerabilityReviewAffects `json:"affects,omitempty"` }
type VulnerabilityReviewUpdateRequest ¶
type VulnerabilityReviewUpdateRequest struct { ID *int `json:"id,omitempty" validate:"required"` Review *ent.VulnerabilityReviewModelUpdate `json:"review,omitempty" validate:"required"` Affects *VulnerabilityReviewAffects `json:"affects,omitempty"` }
Click to show internal directories.
Click to hide internal directories.