Documentation ¶
Index ¶
- Constants
- type Accepted
- type AssetAnnotationDeleteRequest
- type AssetAnnotationRequest
- type AssetRequest
- type AssetWithAnnotationsRequest
- type AssetsGroupRequest
- type AssetsListRequest
- type ChecktypeSettingRequest
- type Created
- type DiscoveredAssetsRequest
- type EmptyRequest
- type Endpoints
- type FindingOverwriteRequest
- type FindingsByIssueRequest
- type FindingsByTargetRequest
- type FindingsRequest
- type Forbidden
- type GlobalStatsRequest
- type GroupAssetRequest
- type HTTPResponse
- type HealthcheckJSONRequest
- type JobRequest
- type ListGroupsRequest
- type ListProgramScansRequest
- type MultiStatus
- type NoContent
- type Ok
- type PolicyRequest
- type ProgramPolicyGroups
- type ProgramRequest
- type ProgramsPolicyGroup
- type RecipientsData
- type ReportRequest
- type ScanRequest
- type ScheduleGlobalRequest
- type ScheduleRequest
- type SendDigestReportRequest
- type ServerDown
- type StatsCoverageRequest
- type StatsRequest
- type TeamMemberRequest
- type TeamRequest
- type TeamUpdateRequest
- type UserRequest
Constants ¶
const ( // Endpoints Healthcheck = "Healthcheck" FindJob = "FindJob" ListUsers = "ListUsers" CreateUser = "CreateUser" UpdateUser = "UpdateUser" FindUser = "FindUser" DeleteUser = "DeleteUser" FindProfile = "FindProfile" GenerateAPIToken = "GenerateAPIToken" CreateTeam = "CreateTeam" UpdateTeam = "UpdateTeam" FindTeam = "FindTeam" ListTeams = "ListTeams" DeleteTeam = "DeleteTeam" FindTeamsByUser = "FindTeamsByUser" ListTeamMembers = "ListTeamMembers" FindTeamMember = "FindTeamMember" CreateTeamMember = "CreateTeamMember" UpdateTeamMember = "UpdateTeamMember" DeleteTeamMember = "DeleteTeamMember" ListRecipients = "ListRecipients" UpdateRecipients = "UpdateRecipients" ListAssets = "ListAssets" CreateAsset = "CreateAsset" CreateAssetMultiStatus = "CreateAssetMultiStatus" MergeDiscoveredAssets = "MergeDiscoveredAssets" FindAsset = "FindAsset" UpdateAsset = "UpdateAsset" DeleteAsset = "DeleteAsset" ListAssetAnnotations = "ListAssetAnnotations" CreateAssetAnnotations = "CreateAssetAnnotations" UpdateAssetAnnotations = "UpdateAssetAnnotations" PutAssetAnnotations = "PutAssetAnnotations" DeleteAssetAnnotations = "DeleteAssetAnnotations" CreateGroup = "CreateGroup" ListGroups = "ListGroups" UpdateGroup = "UpdateGroup" DeleteGroup = "DeleteGroup" FindGroup = "FindGroup" GroupAsset = "GroupAsset" UngroupAsset = "UngroupAsset" ListAssetGroup = "ListAssetGroup" ListPrograms = "ListPrograms" CreateProgram = "CreateProgram" FindProgram = "FindProgram" UpdateProgram = "UpdateProgram" DeleteProgram = "DeleteProgram" CreateSchedule = "CreateSchedule" DeleteSchedule = "DeleteSchedule" ScheduleGlobalProgram = "ScheduleGlobalProgram" ListPolicies = "ListPolicies" CreatePolicy = "CreatePolicy" FindPolicy = "FindPolicy" UpdatePolicy = "UpdatePolicy" DeletePolicy = "DeletePolicy" ListChecktypeSetting = "ListChecktypeSetting" CreateChecktypeSetting = "CreateChecktypeSetting" FindChecktypeSetting = "FindChecktypeSetting" UpdateChecktypeSetting = "UpdateChecktypeSetting" DeleteChecktypeSetting = "DeleteChecktypeSetting" ListProgramScans = "ListProgramScans" CreateScan = "CreateScan" FindScan = "FindScan" AbortScan = "AbortScan" FindReport = "FindReport" CreateReport = "CreateReport" SendReport = "SendReport" FindReportEmail = "FindReportEmail" SendDigestReport = "SendDigestReport" StatsCoverage = "StatsCoverage" ListFindings = "ListFindings" ListFindingsIssues = "ListFindingsIssues" ListFindingsByIssue = "ListFindingsByIssue" ListFindingsTargets = "ListFindingsTargets" ListFindingsByTarget = "ListFindingsByTarget" FindFinding = "FindFinding" CreateFindingOverwrite = "CreateFindingOverwrite" ListFindingOverwrites = "ListFindingOverwrites" ListFindingsLabels = "ListFindingsLabels" StatsMTTR = "StatsMTTR" StatsExposure = "StatsExposure" StatsCurrentExposure = "StatsCurrentExposure" StatsOpen = "StatsOpen" StatsFixed = "StatsFixed" GlobalStatsMTTR = "GlobalStatsMTTR" GlobalStatsExposure = "GlobalStatsExposure" GlobalStatsCurrentExposure = "GlobalStatsCurrentExposure" GlobalStatsOpen = "GlobalStatsOpen" GlobalStatsFixed = "GlobalStatsFixed" GlobalStatsAssets = "GlobalStatsAssets" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accepted ¶
type Accepted struct {
Data interface{}
}
func (Accepted) MarshalJSON ¶
func (Accepted) StatusCode ¶
type AssetAnnotationRequest ¶
type AssetAnnotationRequest struct { TeamID string `json:"team_id" urlvar:"team_id"` AssetID string `json:"asset_id" urlvar:"asset_id"` Annotations api.AssetAnnotationsMap `json:"annotations"` }
type AssetRequest ¶
type AssetRequest struct { ID string `json:"id" urlvar:"asset_id"` TeamID string `json:"team_id" urlvar:"team_id"` Type string `json:"type" validate:"required"` Identifier string `json:"identifier" validate:"required" urlquery:"identifier"` Options *string `json:"options,omitempty"` EnvironmentalCVSS *string `json:"environmental_cvss,omitempty"` ROLFP *api.ROLFP `json:"rolfp"` Scannable *bool `json:"scannable,omitempty"` }
func (AssetRequest) NewAsset ¶
func (ar AssetRequest) NewAsset() *api.Asset
type AssetWithAnnotationsRequest ¶
type AssetWithAnnotationsRequest struct { AssetRequest Annotations api.AssetAnnotationsMap `json:"annotations"` }
type AssetsGroupRequest ¶
type AssetsListRequest ¶
type AssetsListRequest struct { TeamID string `json:"team_id" urlvar:"team_id"` Assets []AssetRequest `json:"assets"` Groups []string `json:"groups"` Annotations api.AssetAnnotationsMap `json:"annotations"` }
type ChecktypeSettingRequest ¶
type Created ¶
type Created struct {
Data interface{}
}
func (Created) MarshalJSON ¶
func (Created) StatusCode ¶
type DiscoveredAssetsRequest ¶
type DiscoveredAssetsRequest struct { TeamID string `json:"team_id" urlvar:"team_id"` Assets []AssetWithAnnotationsRequest `json:"assets"` GroupName string `json:"group_name"` }
type EmptyRequest ¶
type EmptyRequest struct{}
type Endpoints ¶
Endpoints contains all available endpoints for this api
func MakeEndpoints ¶
func MakeEndpoints(s api.VulcanitoService, logger log.Logger) Endpoints
MakeEndpoints initialize endpoints using the given service
type FindingOverwriteRequest ¶
type FindingsByIssueRequest ¶
type FindingsByIssueRequest struct { TeamID string `json:"team_id" urlvar:"team_id"` Status string `urlquery:"status"` MinScore float64 `urlquery:"minScore"` MaxScore float64 `urlquery:"maxScore"` AtDate string `urlquery:"atDate"` MinDate string `urlquery:"minDate"` MaxDate string `urlquery:"maxDate"` SortBy string `urlquery:"sortBy"` Page int `urlquery:"page"` Size int `urlquery:"size"` IssueID string `json:"issue_id" urlvar:"issue_id"` Identifiers string `urlquery:"identifiers"` Labels string `urlquery:"labels"` }
type FindingsByTargetRequest ¶
type FindingsByTargetRequest struct { TeamID string `json:"team_id" urlvar:"team_id"` Status string `urlquery:"status"` MinScore float64 `urlquery:"minScore"` MaxScore float64 `urlquery:"maxScore"` AtDate string `urlquery:"atDate"` MinDate string `urlquery:"minDate"` MaxDate string `urlquery:"maxDate"` SortBy string `urlquery:"sortBy"` Page int `urlquery:"page"` Size int `urlquery:"size"` TargetID string `json:"target_id" urlvar:"target_id"` Identifiers string `urlquery:"identifiers"` Labels string `urlquery:"labels"` }
type FindingsRequest ¶
type FindingsRequest struct { ID string `json:"id" urlvar:"finding_id"` TeamID string `json:"team_id" urlvar:"team_id"` Status string `urlquery:"status"` MinScore float64 `urlquery:"minScore"` MaxScore float64 `urlquery:"maxScore"` AtDate string `urlquery:"atDate"` MinDate string `urlquery:"minDate"` MaxDate string `urlquery:"maxDate"` SortBy string `urlquery:"sortBy"` Page int `urlquery:"page"` Size int `urlquery:"size"` Identifier string `urlquery:"identifier"` IssueID string `urlquery:"issueID"` TargetID string `urlquery:"targetID"` Identifiers string `urlquery:"identifiers"` Labels string `urlquery:"labels"` }
type Forbidden ¶
type Forbidden struct {
Data interface{}
}
func (Forbidden) MarshalJSON ¶
func (Forbidden) StatusCode ¶
type GlobalStatsRequest ¶ added in v1.1.0
type GlobalStatsRequest struct { Tags string `urlquery:"tags"` StatsRequest }
type GroupAssetRequest ¶
type HTTPResponse ¶
type HTTPResponse interface {
StatusCode() int
}
type HealthcheckJSONRequest ¶
type HealthcheckJSONRequest struct { }
type JobRequest ¶
type JobRequest struct {
ID string `json:"job_id" urlvar:"job_id"`
}
JobRequest defines the information required to retrieve a job.
type ListGroupsRequest ¶
type ListProgramScansRequest ¶
type ListProgramScansRequest struct { TeamID string `urlvar:"team_id"` ProgramID string `urlvar:"program_id"` }
ListProgramScansRequest holds the information passed to the ListProgramScans endpoint.
type MultiStatus ¶
type MultiStatus struct {
Data interface{}
}
func (MultiStatus) MarshalJSON ¶
func (m MultiStatus) MarshalJSON() ([]byte, error)
func (MultiStatus) StatusCode ¶
func (makeCreateAssetMultiStatusEndpoint MultiStatus) StatusCode() int
type NoContent ¶
type NoContent struct {
Data interface{}
}
func (NoContent) MarshalJSON ¶
func (NoContent) StatusCode ¶
type PolicyRequest ¶
type ProgramPolicyGroups ¶
type ProgramPolicyGroups []ProgramsPolicyGroup
ProgramPolicyGroups stores a slice with the list os pairs policyid groupid for a program.
func (ProgramPolicyGroups) ToAPI ¶
func (p ProgramPolicyGroups) ToAPI() []*api.ProgramsGroupsPolicies
ToAPI returns the represetantion needed by vulcanito service for the slice of tuples of policies-groups associated to a program
type ProgramRequest ¶
type ProgramsPolicyGroup ¶
type ProgramsPolicyGroup struct { PolicyID string `json:"policy_id" validate:"required"` GroupID string `json:"group_id" validate:"required"` }
ProgramsPolicyGroup holds the tuples (PolicyID,GroupID) that defines a a set of checktypes to be executed against a set of assets in a program.
type RecipientsData ¶
type ReportRequest ¶
type ScanRequest ¶
type ScheduleGlobalRequest ¶
type ScheduleGlobalRequest struct { ID string `json:"id" urlvar:"program_id"` Cron string `json:"cron"` }
ScheduleGlobalRequest holds the payload required for the endpoint that schedules global programs.
type ScheduleRequest ¶
type ScheduleRequest struct { ID string `json:"id" urlvar:"program_id"` TeamID string `json:"team_id" urlvar:"team_id"` Cron string `json:"cron"` }
ScheduleRequest holds the payload required for the endpoint that schedules a program.
type SendDigestReportRequest ¶
type ServerDown ¶
type ServerDown struct {
Data interface{}
}
func (ServerDown) MarshalJSON ¶
func (c ServerDown) MarshalJSON() ([]byte, error)
func (ServerDown) StatusCode ¶
func (c ServerDown) StatusCode() int
type StatsCoverageRequest ¶
type StatsCoverageRequest struct {
TeamID string `json:"team_id" urlvar:"team_id"`
}
type StatsRequest ¶
type StatsRequest struct { TeamID string `json:"team_id" urlvar:"team_id"` Teams string `urlquery:"teams"` MinDate string `urlquery:"minDate"` MaxDate string `urlquery:"maxDate"` AtDate string `urlquery:"atDate"` MinScore float64 `urlquery:"minScore"` MaxScore float64 `urlquery:"maxScore"` Identifiers string `urlquery:"identifiers"` Labels string `urlquery:"labels"` }