Documentation
¶
Overview ¶
Package defectdojo provides a client for using the DefectDojo API.
Installation ¶
Import the module in your source code files:
import "github.com/truemilk/go-defectdojo/defectdojo"
Usage ¶
Define a new Defectdojo client:
url := os.Getenv("DOJO_URI") token := os.Getenv("DOJO_APIKEY") dj, err := defectdojo.NewDojoClient(url, token, nil)
It is possible to specify a custom HTTP Transport when creating the client:
client := &http.Client{ Timeout: time.Minute, Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, }, } dj, err := defectdojo.NewDojoClient(url, token, client)
Then use the various methods to access the DefectDojo API.
The services of a client divide the API into logical chunks and correspond to the structure of the DefectDojo API documentation.
Auxiliary methods are provided to facilitate the definition of parameters of Bool/String/Int/Date/Slice type. These should be used when passing parameters to methods that create/update/delete objects.
ctx := context.Background() resp, err := dj.Technologies.Create(ctx, &defectdojo.Technology{ Name: defectdojo.String("A new technology"), Product: defectdojo.Int(1), User: defectdojo.Int(1), })
NOTE: Using the context package, one can easily pass cancellation signals and deadlines to various services of the client for handling a request. In case there is no context available, then context.Background() can be used as a starting point.
Authentication ¶
The go-defectdojo library handles authentication via Token. You can retrieve a valid API v2 Key from within your DefectDojo instance.
It is also possible to retrieve the API key from an un-authenticated call to the "/api-token-auth/" endpoint, specifying valid username and password as part of the posted data. For the purpose of this API call, the client can be instantiated with an empty string as the `token` parameter.
dj, _ := defectdojo.NewDojoClient(url, "", nil) resp, err := dj.ApiTokenAuth.Create(ctx, &defectdojo.AuthToken{ Username: defectdojo.String("username"), Password: defectdojo.String("password"), }) fmt.Println(string(*resp.Token))
The token can be later used to instantiate the client again for further authenticated API calls.
Index ¶
- func Bool(b bool) *bool
- func Date(d time.Time) *time.Time
- func Int(i int) *int
- func Slice(v []string) *[]string
- func Str(s string) *string
- type ApiTokenAuthService
- type AuthToken
- type Client
- type DojoGroup
- type DojoGroups
- type DojoGroupsService
- type Engagement
- type Engagements
- type EngagementsOptions
- type EngagementsService
- type Finding
- type Findings
- type FindingsOptions
- type FindingsService
- type ImportScan
- type ImportScanService
- type Note
- type Notes
- type NotesService
- type Product
- type ProductType
- type ProductTypes
- type ProductTypesOptions
- type ProductTypesService
- func (c *ProductTypesService) Create(ctx context.Context, u *ProductType) (*ProductType, error)
- func (c *ProductTypesService) Delete(ctx context.Context, id int) (*ProductType, error)
- func (c *ProductTypesService) List(ctx context.Context, options *ProductTypesOptions) (*ProductTypes, error)
- func (c *ProductTypesService) PartialUpdate(ctx context.Context, id int, u *ProductType) (*ProductType, error)
- func (c *ProductTypesService) Read(ctx context.Context, id int) (*ProductType, error)
- func (c *ProductTypesService) Update(ctx context.Context, id int, u *ProductType) (*ProductType, error)
- type Products
- type ProductsOptions
- type ProductsService
- func (c *ProductsService) Create(ctx context.Context, u *Product) (*Product, error)
- func (c *ProductsService) Delete(ctx context.Context, id int) (*Product, error)
- func (c *ProductsService) List(ctx context.Context, options *ProductsOptions) (*Products, error)
- func (c *ProductsService) Read(ctx context.Context, id int) (*Product, error)
- type ReImportScan
- type ReImportScanService
- type ReimportScanMap
- type Technologies
- type TechnologiesOptions
- type TechnologiesService
- func (c *TechnologiesService) Create(ctx context.Context, u *Technology) (*Technology, error)
- func (c *TechnologiesService) Delete(ctx context.Context, id int) (*Technology, error)
- func (c *TechnologiesService) List(ctx context.Context, options *TechnologiesOptions) (*Technologies, error)
- func (c *TechnologiesService) Read(ctx context.Context, id int) (*Technology, error)
- type Technology
- type TestType
- type TestTypes
- type TestTypesOptions
- type TestTypesService
- func (c *TestTypesService) Create(ctx context.Context, u *TestType) (*TestType, error)
- func (c *TestTypesService) List(ctx context.Context, options *TestTypesOptions) (*TestTypes, error)
- func (c *TestTypesService) PartialUpdate(ctx context.Context, id int, u *TestType) (*TestType, error)
- func (c *TestTypesService) Read(ctx context.Context, id int) (*TestType, error)
- func (c *TestTypesService) Update(ctx context.Context, id int, u *TestType) (*TestType, error)
- type ToolType
- type ToolTypes
- type ToolTypesOptions
- type ToolTypesService
- func (c *ToolTypesService) Create(ctx context.Context, u *ToolType) (*ToolType, error)
- func (c *ToolTypesService) Delete(ctx context.Context, id int) (*ToolType, error)
- func (c *ToolTypesService) List(ctx context.Context, options *ToolTypesOptions) (*ToolTypes, error)
- func (c *ToolTypesService) PartialUpdate(ctx context.Context, id int, u *ToolType) (*ToolType, error)
- func (c *ToolTypesService) Read(ctx context.Context, id int) (*ToolType, error)
- func (c *ToolTypesService) Update(ctx context.Context, id int, u *ToolType) (*ToolType, error)
- type User
- type UserContactInfo
- type UserContactInfos
- type UserContactInfosOptions
- type UserContactInfosService
- func (c *UserContactInfosService) Create(ctx context.Context, u *UserContactInfo) (*UserContactInfo, error)
- func (c *UserContactInfosService) Delete(ctx context.Context, id int) (*UserContactInfo, error)
- func (c *UserContactInfosService) List(ctx context.Context, options *UserContactInfosOptions) (*UserContactInfos, error)
- func (c *UserContactInfosService) PartialUpdate(ctx context.Context, id int, u *UserContactInfo) (*UserContactInfo, error)
- func (c *UserContactInfosService) Read(ctx context.Context, id int) (*UserContactInfo, error)
- func (c *UserContactInfosService) Update(ctx context.Context, id int, u *UserContactInfo) (*UserContactInfo, error)
- type UserProfile
- type UserProfileService
- type Users
- type UsersOptions
- type UsersService
- func (c *UsersService) Create(ctx context.Context, u *User) (*User, error)
- func (c *UsersService) Delete(ctx context.Context, id int) (*User, error)
- func (c *UsersService) List(ctx context.Context, options *UsersOptions) (*Users, error)
- func (c *UsersService) PartialUpdate(ctx context.Context, id int, u *User) (*User, error)
- func (c *UsersService) Read(ctx context.Context, id int) (*User, error)
- func (c *UsersService) Update(ctx context.Context, id int, u *User) (*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store b and returns a pointer to it.
func Date ¶
Date is a helper routine that allocates a new date value to store d and returns a pointer to it.
func Int ¶
Int is a helper routine that allocates a new int value to store i and returns a pointer to it.
Types ¶
type ApiTokenAuthService ¶
type ApiTokenAuthService struct {
// contains filtered or unexported fields
}
type Client ¶
type Client struct { BaseURL *url.URL Token string HTTPClient *http.Client ApiTokenAuth *ApiTokenAuthService DojoGroups *DojoGroupsService Engagements *EngagementsService Findings *FindingsService ImportScan *ImportScanService ReImportScan *ReImportScanService Notes *NotesService ProductTypes *ProductTypesService Products *ProductsService Technologies *TechnologiesService TestTypes *TestTypesService ToolTypes *ToolTypesService UserContactInfos *UserContactInfosService UserProfile *UserProfileService Users *UsersService }
type DojoGroups ¶
type DojoGroupsService ¶
type DojoGroupsService struct {
// contains filtered or unexported fields
}
type Engagement ¶
type Engagement struct { Id *int `json:"id,omitempty"` Tags *[]string `json:"tags,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Version *string `json:"version,omitempty"` FirstContacted *string `json:"first_contacted,omitempty"` TargetStart *string `json:"target_start,omitempty"` TargetEnd *string `json:"target_end,omitempty"` Reason *string `json:"reason,omitempty"` Updated *string `json:"updated,omitempty"` Created *string `json:"created,omitempty"` Active *bool `json:"active,omitempty"` Tracker *string `json:"tracker,omitempty"` TestStrategy *string `json:"test_strategy,omitempty"` ThreatModel *bool `json:"threat_model,omitempty"` ApiTest *bool `json:"api_test,omitempty"` PenTest *bool `json:"pen_test,omitempty"` CheckList *bool `json:"check_list,omitempty"` Status *string `json:"status,omitempty"` Progress *string `json:"progress,omitempty"` TmodelPath *string `json:"tmodel_path,omitempty"` DoneTesting *bool `json:"done_testing,omitempty"` EngagementType *string `json:"engagement_type,omitempty"` BuildId *string `json:"build_id,omitempty"` CommitHash *string `json:"commit_hash,omitempty"` BranchTag *string `json:"branch_tag,omitempty"` SourceCodeManagementUri *string `json:"source_code_management_uri,omitempty"` DeduplicationOnEngagement *bool `json:"deduplication_on_engagement,omitempty"` Lead *int `json:"lead,omitempty"` Requester *int `json:"requester,omitempty"` Preset *int `json:"preset,omitempty"` ReportType *int `json:"report_type,omitempty"` Product *int `json:"product,omitempty"` BuildServer *int `json:"build_server,omitempty"` SourceCodeManagementServer *int `json:"source_code_management_server,omitempty"` OrchestrationEngine *int `json:"orchestration_engine,omitempty"` Notes *[]Note `json:"notes,omitempty"` Files *[]struct { Id *int `json:"id,omitempty"` File *string `json:"file,omitempty"` Title *string `json:"title,omitempty"` } `json:"files,omitempty"` RiskAcceptance *[]int `json:"risk_acceptance,omitempty"` }
type Engagements ¶
type Engagements struct { Count *int `json:"count,omitempty"` Next *string `json:"next,omitempty"` Previous *string `json:"previous,omitempty"` Results *[]Engagement `json:"results,omitempty"` }
type EngagementsOptions ¶
func (*EngagementsOptions) ToString ¶
func (o *EngagementsOptions) ToString() string
type EngagementsService ¶
type EngagementsService struct {
// contains filtered or unexported fields
}
func (*EngagementsService) Create ¶
func (c *EngagementsService) Create(ctx context.Context, u *Engagement) (*Engagement, error)
func (*EngagementsService) List ¶
func (c *EngagementsService) List(ctx context.Context, options *EngagementsOptions) (*Engagements, error)
func (*EngagementsService) Read ¶
func (c *EngagementsService) Read(ctx context.Context, id int) (*Engagement, error)
type Finding ¶
type Finding struct { Id *int `json:"id,omitempty"` Tags *[]string `json:"tags,omitempty"` RequestResponse *struct { ReqResp *[]map[string]string `json:"req_resp,omitempty"` } `json:"request_response,omitempty"` AcceptedRisks *[]struct { Id *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` Recommendation *string `json:"recommendation,omitempty"` RecommendationDetails *string `json:"recommendation_details,omitempty"` Decision *string `json:"decision,omitempty"` DecisionDetails *string `json:"decision_details,omitempty"` AcceptedBy *string `json:"accepted_by,omitempty"` Path *string `json:"path,omitempty"` ExpirationDate *time.Time `json:"expiration_date,omitempty"` ExpirationDateWarned *time.Time `json:"expiration_date_warned,omitempty"` ExpirationDateHandled *time.Time `json:"expiration_date_handled,omitempty"` ReactivateExpired *bool `json:"reactivate_expired,omitempty"` RestartSlaExpired *bool `json:"restart_sla_expired,omitempty"` Created *time.Time `json:"created,omitempty"` Updated *time.Time `json:"updated,omitempty"` Owner *int `json:"owner,omitempty"` AcceptedFindings *[]int `json:"accepted_findings,omitempty"` Notes *[]int `json:"notes,omitempty"` } `json:"accepted_risks,omitempty"` PushToJira *bool `json:"push_to_jira,omitempty"` Age *int `json:"age,omitempty"` SlaDaysRemaining *int `json:"sla_days_remaining,omitempty"` FindingMeta *[]struct { Name *string `json:"name,omitempty"` Value *string `json:"value,omitempty"` } `json:"finding_meta,omitempty"` RelatedFields *struct { Test *struct { Id *int `json:"id,omitempty"` Title *string `json:"title,omitempty"` TestType *struct { Id *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` } `json:"test_type,omitempty"` Engagement *struct { Id *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` Product *struct { Id *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` ProdType *struct { Id *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` } `json:"prod_type,omitempty"` } `json:"product,omitempty"` BranchTag *string `json:"branch_tag,omitempty"` BuildId *string `json:"build_id,omitempty"` CommitHash *string `json:"commit_hash,omitempty"` Version *string `json:"version,omitempty"` } `json:"engagement,omitempty"` Environment *struct { Id *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` } `json:"environment,omitempty"` BranchTag *string `json:"branch_tag,omitempty"` BuildId *string `json:"build_id,omitempty"` CommitHash *string `json:"commit_hash,omitempty"` Version *string `json:"version,omitempty"` } `json:"test,omitempty"` Jira *struct { Id *int `json:"id,omitempty"` Url *string `json:"url,omitempty"` JiraId *string `json:"jira_id,omitempty"` JiraKey *string `json:"jira_key,omitempty"` JiraCreation *time.Time `json:"jira_creation,omitempty"` JiraChange *time.Time `json:"jira_change,omitempty"` JiraProject *int `json:"jira_project,omitempty"` Finding *int `json:"finding,omitempty"` Engagement *int `json:"engagement,omitempty"` FindingGroup *int `json:"finding_group,omitempty"` } `json:"jira,omitempty"` } `json:"related_fields,omitempty"` JiraCreation *time.Time `json:"jira_creation,omitempty"` JiraChange *time.Time `json:"jira_change,omitempty"` DisplayStatus *string `json:"display_status,omitempty"` FindingGroups *[]struct { Id *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` Test *int `json:"test,omitempty"` JiraIssue *struct { Id *int `json:"id,omitempty"` Url *string `json:"url,omitempty"` JiraId *string `json:"jira_id,omitempty"` JiraKey *string `json:"jira_key,omitempty"` JiraCreation *time.Time `json:"jira_creation,omitempty"` JiraChange *time.Time `json:"jira_change,omitempty"` JiraProject *int `json:"jira_project,omitempty"` Finding *int `json:"finding,omitempty"` Engagement *int `json:"engagement,omitempty"` FindingGroup *int `json:"finding_group,omitempty"` } `json:"jira_issue,omitempty"` } `json:"finding_groups,omitempty"` Title *string `json:"title,omitempty"` Date *string `json:"date,omitempty"` SlaStartDate *string `json:"sla_start_date,omitempty"` Cwe *int `json:"cwe,omitempty"` Cve *string `json:"cve,omitempty"` Cvssv3 *string `json:"cvssv3,omitempty"` Cvssv3Score *float32 `json:"cvssv3_score,omitempty"` Url *string `json:"url,omitempty"` Severity *string `json:"severity,omitempty"` Description *string `json:"description,omitempty"` Mitigation *string `json:"mitigation,omitempty"` Impact *string `json:"impact,omitempty"` StepsToReproduce *string `json:"steps_to_reproduce,omitempty"` SeverityJustification *string `json:"severity_justification,omitempty"` References *string `json:"references,omitempty"` Active *bool `json:"active,omitempty"` Verified *bool `json:"verified,omitempty"` FalseP *bool `json:"false_p,omitempty"` Duplicate *bool `json:"duplicate,omitempty"` OutOfScope *bool `json:"out_of_scope,omitempty"` RiskAccepted *bool `json:"risk_accepted,omitempty"` UnderReview *bool `json:"under_review,omitempty"` LastStatusUpdate *time.Time `json:"last_status_update,omitempty"` UnderDefectReview *bool `json:"under_defect_review,omitempty"` IsMitigated *bool `json:"is_mitigated,omitempty"` ThreadId *int `json:"thread_id,omitempty"` Mitigated *time.Time `json:"mitigated,omitempty"` NumericalSeverity *string `json:"numerical_severity,omitempty"` LastReviewed *time.Time `json:"last_reviewed,omitempty"` Param *string `json:"param,omitempty"` Payload *string `json:"payload,omitempty"` HashCode *string `json:"hash_code,omitempty"` Line *int `json:"line,omitempty"` FilePath *string `json:"file_path,omitempty"` ComponentName *string `json:"component_name,omitempty"` ComponentVersion *string `json:"component_version,omitempty"` StaticFinding *bool `json:"static_finding,omitempty"` DynamicFinding *bool `json:"dynamic_finding,omitempty"` Created *time.Time `json:"created,omitempty"` ScannerConfidence *int `json:"scanner_confidence,omitempty"` UniqueIdFromTool *string `json:"unique_id_from_tool,omitempty"` VulnIdFromTool *string `json:"vuln_id_from_tool,omitempty"` SastSourceObject *string `json:"sast_source_object,omitempty"` SastSinkObject *string `json:"sast_sink_object,omitempty"` SastSourceLine *int `json:"sast_source_line,omitempty"` SastSourceFilePath *string `json:"sast_source_file_path,omitempty"` NbOccurences *int `json:"nb_occurences,omitempty"` PublishDate *string `json:"publish_date,omitempty"` Service *string `json:"service,omitempty"` Test *int `json:"test,omitempty"` DuplicateFinding *int `json:"duplicate_finding,omitempty"` ReviewRequestedBy *int `json:"review_requested_by,omitempty"` DefectReviewRequestedBy *int `json:"defect_review_requested_by,omitempty"` MitigatedBy *int `json:"mitigated_by,omitempty"` Reporter *int `json:"reporter,omitempty"` LastReviewedBy *int `json:"last_reviewed_by,omitempty"` SonarqubeIssue *int `json:"sonarqube_issue,omitempty"` Endpoints *[]int `json:"endpoints,omitempty"` EndpointStatus *[]int `json:"endpoint_status,omitempty"` Reviewers *[]int `json:"reviewers,omitempty"` Notes *[]Note `json:"notes,omitempty"` Files *[]int `json:"files,omitempty"` FoundBy *[]int `json:"found_by,omitempty"` }
type Findings ¶
type Findings struct { Count *int `json:"count,omitempty"` Next *string `json:"next,omitempty"` Previous *string `json:"previous,omitempty"` Results *[]Finding `json:"results,omitempty"` Prefetch *struct { DuplicateFinding *map[string]Finding `json:"duplicate_finding,omitempty"` } `json:"prefetch,omitempty"` }
type FindingsOptions ¶
type FindingsOptions struct { Limit int Offset int Title string Severity string Active string Verified string Prefetch string }
func (*FindingsOptions) ToString ¶
func (o *FindingsOptions) ToString() string
type FindingsService ¶
type FindingsService struct {
// contains filtered or unexported fields
}
func (*FindingsService) List ¶
func (c *FindingsService) List(ctx context.Context, options *FindingsOptions) (*Findings, error)
type ImportScan ¶
type ImportScan struct { ScanDate *string `json:"scan_date,omitempty"` MinimumSeverity *string `json:"minimum_severity,omitempty"` Active *bool `json:"active,omitempty"` Verified *bool `json:"verified,omitempty"` ScanType *string `json:"scan_type,omitempty"` EndpointToAdd *int `json:"endpoint_to_add,omitempty"` File *string `json:"file,omitempty"` ProductTypeName *string `json:"product_type_name,omitempty"` ProductName *string `json:"product_name,omitempty"` EngagementName *string `json:"engagement_name,omitempty"` Engagement *int `json:"engagement,omitempty"` TestTitle *string `json:"test_title,omitempty"` AutoCreateContext *bool `json:"auto_create_context,omitempty"` Lead *int `json:"lead,omitempty"` Tags *[]string `json:"tags,omitempty"` CloseOldFindings *bool `json:"close_old_findings,omitempty"` PushToJira *bool `json:"push_to_jira,omitempty"` Environment *string `json:"environment,omitempty"` Version *string `json:"version,omitempty"` BuildId *string `json:"build_id,omitempty"` BranchTag *string `json:"branch_tag,omitempty"` CommitHash *string `json:"commit_hash,omitempty"` ApiScanConfiguration *int `json:"api_scan_configuration,omitempty"` Service *string `json:"service,omitempty"` GroupBy *string `json:"group_by,omitempty"` Test *int `json:"test,omitempty"` TestId *int `json:"test_id,omitempty"` EngagementId *int `json:"engagement_id,omitempty"` ProductId *int `json:"product_id,omitempty"` ProductTypeId *int `json:"product_type_id,omitempty"` }
type ImportScanService ¶
type ImportScanService struct {
// contains filtered or unexported fields
}
func (*ImportScanService) Create ¶
func (c *ImportScanService) Create(ctx context.Context, m *ImportScan) (*ImportScan, error)
type Note ¶
type Note struct { Id *int `json:"id,omitempty"` Author *User `json:"author,omitempty"` Editor *User `json:"editor,omitempty"` History *[]struct { Id *int `json:"id,omitempty"` CurrentEditor *struct { Id *int `json:"id,omitempty"` Username *string `json:"username,omitempty"` FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` } `json:"current_editor,omitempty"` Data *string `json:"data,omitempty"` Time *time.Time `json:"time,omitempty"` NoteType *int `json:"note_type,omitempty"` } `json:"history,omitempty"` Entry *string `json:"entry,omitempty"` Date *time.Time `json:"date,omitempty"` Private *bool `json:"private,omitempty"` Edited *bool `json:"edited,omitempty"` EditTime *time.Time `json:"edit_time,omitempty"` NoteType *int `json:"note_type,omitempty"` }
type NotesService ¶
type NotesService struct {
// contains filtered or unexported fields
}
type Product ¶
type Product struct { ID *int `json:"id,omitempty"` FindingsCount *int `json:"findings_count,omitempty"` FindingsList *[]int `json:"findings_list,omitempty"` Tags *[]string `json:"tags,omitempty"` ProductMeta *[]struct { Name *string `json:"name,omitempty"` Value *string `json:"value,omitempty"` } `json:"product_meta,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Created *time.Time `json:"created,omitempty"` ProdNumericGrade *int `json:"prod_numeric_grade,omitempty"` BusinessCriticality *string `json:"business_criticality,omitempty"` Platform *string `json:"platform,omitempty"` Lifecycle *string `json:"lifecycle,omitempty"` Origin *string `json:"origin,omitempty"` UserRecords *int `json:"user_records,omitempty"` Revenue *string `json:"revenue,omitempty"` ExternalAudience *bool `json:"external_audience,omitempty"` InternetAccessible *bool `json:"internet_accessible,omitempty"` EnableSimpleRiskAcceptance *bool `json:"enable_simple_risk_acceptance,omitempty"` EnableFullRiskAcceptance *bool `json:"enable_full_risk_acceptance,omitempty"` ProductManager *int `json:"product_manager,omitempty"` TechnicalContact *int `json:"technical_contact,omitempty"` TeamManager *int `json:"team_manager,omitempty"` ProdType *int `json:"prod_type,omitempty"` Members *[]int `json:"members,omitempty"` AuthorizationGroups *[]int `json:"authorization_groups,omitempty"` Regulations *[]int `json:"regulations,omitempty"` }
type ProductType ¶
type ProductType struct { Id *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` CriticalProduct *bool `json:"critical_product,omitempty"` KeyProduct *bool `json:"key_product,omitempty"` Updated *time.Time `json:"updated,omitempty"` Created *time.Time `json:"created,omitempty"` Members *[]int `json:"members,omitempty"` AuthorizationGroups *[]int `json:"authorization_groups,omitempty"` }
type ProductTypes ¶
type ProductTypes struct { Count *int `json:"count,omitempty"` Next *string `json:"next,omitempty"` Previous *string `json:"previous,omitempty"` Results *[]ProductType `json:"results,omitempty"` Prefetch *struct { AuthorizationGroups *map[string]DojoGroup `json:"authorization_groups,omitempty"` Members *map[string]User `json:"members,omitempty"` } `json:"prefetch,omitempty"` }
type ProductTypesOptions ¶
type ProductTypesOptions struct { Limit int Offset int ID int Name string CriticalProduct string KeyProduct string Created string Updated string Prefetch string }
func (*ProductTypesOptions) ToString ¶
func (o *ProductTypesOptions) ToString() string
type ProductTypesService ¶
type ProductTypesService struct {
// contains filtered or unexported fields
}
func (*ProductTypesService) Create ¶
func (c *ProductTypesService) Create(ctx context.Context, u *ProductType) (*ProductType, error)
func (*ProductTypesService) Delete ¶
func (c *ProductTypesService) Delete(ctx context.Context, id int) (*ProductType, error)
func (*ProductTypesService) List ¶
func (c *ProductTypesService) List(ctx context.Context, options *ProductTypesOptions) (*ProductTypes, error)
func (*ProductTypesService) PartialUpdate ¶
func (c *ProductTypesService) PartialUpdate(ctx context.Context, id int, u *ProductType) (*ProductType, error)
func (*ProductTypesService) Read ¶
func (c *ProductTypesService) Read(ctx context.Context, id int) (*ProductType, error)
func (*ProductTypesService) Update ¶
func (c *ProductTypesService) Update(ctx context.Context, id int, u *ProductType) (*ProductType, error)
type Products ¶
type Products struct { Count *int `json:"count,omitempty"` Next *string `json:"next,omitempty"` Previous *string `json:"previous,omitempty"` Results *[]Product `json:"results,omitempty"` Prefetch *struct { AuthorizationGroups *map[string]DojoGroup `json:"authorization_groups,omitempty"` Members *map[string]User `json:"members,omitempty"` ProdType *map[string]ProductType `json:"prod_type,omitempty"` ProductManager *map[string]User `json:"product_manager,omitempty"` TeamManager *map[string]User `json:"team_manager,omitempty"` TechnicalContact *map[string]User `json:"technical_contact,omitempty"` } `json:"prefetch,omitempty"` }
type ProductsOptions ¶
func (*ProductsOptions) ToString ¶
func (o *ProductsOptions) ToString() string
type ProductsService ¶
type ProductsService struct {
// contains filtered or unexported fields
}
func (*ProductsService) List ¶
func (c *ProductsService) List(ctx context.Context, options *ProductsOptions) (*Products, error)
type ReImportScan ¶
type ReImportScan struct { ScanDate *string `json:"scan_date,omitempty"` MinimumSeverity *string `json:"minimum_severity,omitempty"` Active *bool `json:"active,omitempty"` Verified *bool `json:"verified,omitempty"` ScanType *string `json:"scan_type,omitempty"` EndpointToAdd *int `json:"endpoint_to_add,omitempty"` File *string `json:"file,omitempty"` ProductTypeName *string `json:"product_type_name,omitempty"` ProductName *string `json:"product_name,omitempty"` EngagementName *string `json:"engagement_name,omitempty"` Engagement *int `json:"engagement,omitempty"` TestTitle *string `json:"test_title,omitempty"` AutoCreateContext *bool `json:"auto_create_context,omitempty"` Lead *int `json:"lead,omitempty"` Tags *[]string `json:"tags,omitempty"` CloseOldFindings *bool `json:"close_old_findings,omitempty"` PushToJira *bool `json:"push_to_jira,omitempty"` Environment *string `json:"environment,omitempty"` Version *string `json:"version,omitempty"` BuildId *string `json:"build_id,omitempty"` BranchTag *string `json:"branch_tag,omitempty"` CommitHash *string `json:"commit_hash,omitempty"` ApiScanConfiguration *int `json:"api_scan_configuration,omitempty"` Service *string `json:"service,omitempty"` GroupBy *string `json:"group_by,omitempty"` Test *int `json:"test,omitempty"` TestId *int `json:"test_id,omitempty"` EngagementId *int `json:"engagement_id,omitempty"` ProductId *int `json:"product_id,omitempty"` ProductTypeId *int `json:"product_type_id,omitempty"` }
type ReImportScanService ¶
type ReImportScanService struct {
// contains filtered or unexported fields
}
func (*ReImportScanService) Create ¶
func (c *ReImportScanService) Create(ctx context.Context, m *ReImportScan) (*ReImportScan, error)
type ReimportScanMap ¶
type Technologies ¶
type Technologies struct { Count *int `json:"count,omitempty"` Next *string `json:"next,omitempty"` Previous *string `json:"previous,omitempty"` Results *[]Technology `json:"results,omitempty"` }
type TechnologiesOptions ¶
func (*TechnologiesOptions) ToString ¶
func (o *TechnologiesOptions) ToString() string
type TechnologiesService ¶
type TechnologiesService struct {
// contains filtered or unexported fields
}
func (*TechnologiesService) Create ¶
func (c *TechnologiesService) Create(ctx context.Context, u *Technology) (*Technology, error)
func (*TechnologiesService) Delete ¶
func (c *TechnologiesService) Delete(ctx context.Context, id int) (*Technology, error)
func (*TechnologiesService) List ¶
func (c *TechnologiesService) List(ctx context.Context, options *TechnologiesOptions) (*Technologies, error)
func (*TechnologiesService) Read ¶
func (c *TechnologiesService) Read(ctx context.Context, id int) (*Technology, error)
type Technology ¶
type Technology struct { Id *int `json:"id,omitempty"` Tags *[]string `json:"tags,omitempty"` Name *string `json:"name,omitempty"` Confidence *int `json:"confidence,omitempty"` Version *string `json:"version,omitempty"` Icon *string `json:"icon,omitempty"` Website *string `json:"website,omitempty"` WebsiteFound *string `json:"website_found,omitempty"` Created *time.Time `json:"created,omitempty"` Product *int `json:"product,omitempty"` User *int `json:"user,omitempty"` }
type TestTypesOptions ¶
func (*TestTypesOptions) ToString ¶
func (o *TestTypesOptions) ToString() string
type TestTypesService ¶
type TestTypesService struct {
// contains filtered or unexported fields
}
func (*TestTypesService) List ¶
func (c *TestTypesService) List(ctx context.Context, options *TestTypesOptions) (*TestTypes, error)
func (*TestTypesService) PartialUpdate ¶
type ToolTypesOptions ¶
func (*ToolTypesOptions) ToString ¶
func (o *ToolTypesOptions) ToString() string
type ToolTypesService ¶
type ToolTypesService struct {
// contains filtered or unexported fields
}
func (*ToolTypesService) List ¶
func (c *ToolTypesService) List(ctx context.Context, options *ToolTypesOptions) (*ToolTypes, error)
func (*ToolTypesService) PartialUpdate ¶
type User ¶
type User struct { ID *int `json:"id,omitempty"` Username *string `json:"username,omitempty"` FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` Email *string `json:"email,omitempty"` LastLogin *time.Time `json:"last_login,omitempty"` IsActive *bool `json:"is_active,omitempty"` IsStaff *bool `json:"is_staff,omitempty"` IsSuperuser *bool `json:"is_superuser,omitempty"` Password *string `json:"password,omitempty"` }
type UserContactInfo ¶
type UserContactInfo struct { Id *int `json:"id,omitempty"` Title *string `json:"title,omitempty"` PhoneNumber *string `json:"phone_number,omitempty"` CellNumber *string `json:"cell_number,omitempty"` TwitterUsername *string `json:"twitter_username,omitempty"` GithubUsername *string `json:"github_username,omitempty"` SlackUsername *string `json:"slack_username,omitempty"` SlackUserID *string `json:"slack_user_id,omitempty"` BlockExecution *bool `json:"block_execution,omitempty"` ForcePasswordReset *bool `json:"force_password_reset,omitempty"` User *int `json:"user,omitempty"` }
type UserContactInfos ¶
type UserContactInfosOptions ¶
type UserContactInfosOptions struct { Limit int Offset int User string Title string PhoneNumber string CellNumber string TwitterUsername string GithubUsername string SlackUsername string SlackUserID string BlockExecution string ForcePasswordReset string Prefetch string }
func (*UserContactInfosOptions) ToString ¶
func (o *UserContactInfosOptions) ToString() string
type UserContactInfosService ¶
type UserContactInfosService struct {
// contains filtered or unexported fields
}
func (*UserContactInfosService) Create ¶
func (c *UserContactInfosService) Create(ctx context.Context, u *UserContactInfo) (*UserContactInfo, error)
func (*UserContactInfosService) Delete ¶
func (c *UserContactInfosService) Delete(ctx context.Context, id int) (*UserContactInfo, error)
func (*UserContactInfosService) List ¶
func (c *UserContactInfosService) List(ctx context.Context, options *UserContactInfosOptions) (*UserContactInfos, error)
func (*UserContactInfosService) PartialUpdate ¶
func (c *UserContactInfosService) PartialUpdate(ctx context.Context, id int, u *UserContactInfo) (*UserContactInfo, error)
func (*UserContactInfosService) Read ¶
func (c *UserContactInfosService) Read(ctx context.Context, id int) (*UserContactInfo, error)
func (*UserContactInfosService) Update ¶
func (c *UserContactInfosService) Update(ctx context.Context, id int, u *UserContactInfo) (*UserContactInfo, error)
type UserProfile ¶
type UserProfile struct { User *User `json:"user,omitempty"` UserContactInfo *UserContactInfo `json:"user_contact_info,omitempty"` GlobalRole *struct { Id *int `json:"id,omitempty"` User *int `json:"user,omitempty"` Group *int `json:"group,omitempty"` Role *int `json:"role,omitempty"` } `json:"global_role,omitempty"` DojoGroupMember *[]struct { Id *int `json:"id,omitempty"` Group *int `json:"group,omitempty"` User *int `json:"user,omitempty"` Role *int `json:"role,omitempty"` } `json:"dojo_group_member,omitempty"` ProductTypeMember *[]struct { Id *int `json:"id,omitempty"` ProductType *int `json:"product_type,omitempty"` User *int `json:"user,omitempty"` Role *int `json:"role,omitempty"` } `json:"product_type_member,omitempty"` ProductMember *[]struct { Id *int `json:"id,omitempty"` Product *int `json:"product,omitempty"` User *int `json:"user,omitempty"` Role *int `json:"role,omitempty"` } `json:"product_member,omitempty"` }
type UserProfileService ¶
type UserProfileService struct {
// contains filtered or unexported fields
}
func (*UserProfileService) List ¶
func (c *UserProfileService) List(ctx context.Context) (*UserProfile, error)
type UsersOptions ¶
type UsersOptions struct { Limit int Offset int ID int Username string FirstName string LastName string Email string }
func (*UsersOptions) ToString ¶
func (o *UsersOptions) ToString() string
type UsersService ¶
type UsersService struct {
// contains filtered or unexported fields
}
func (*UsersService) List ¶
func (c *UsersService) List(ctx context.Context, options *UsersOptions) (*Users, error)