defectdojo_client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const APPLICATION_JSON = "application/json"

Variables

This section is empty.

Functions

func BuildAuthHeader

func BuildAuthHeader(api_key string) (string, string)

Types

type DefectdojoClient

type DefectdojoClient struct {
	// contains filtered or unexported fields
}

func NewDefectdojoClient

func NewDefectdojoClient(url string, api_key string) *DefectdojoClient

func (*DefectdojoClient) BuildJsonRequestBytez

func (c *DefectdojoClient) BuildJsonRequestBytez(req_payload interface{}) (*bytes.Buffer, error)

func (*DefectdojoClient) BuildMultipartFormBytez

func (c *DefectdojoClient) BuildMultipartFormBytez(values map[string]string, bytez []byte) (*bytes.Buffer, string)

func (*DefectdojoClient) CreateEngagement

func (c *DefectdojoClient) CreateEngagement(p *Product, report_type string, close_engagement bool) (*Engagement, error)

func (*DefectdojoClient) CreateProduct

func (c *DefectdojoClient) CreateProduct(name string, product_type string) (*Product, error)

func (*DefectdojoClient) CreateProductType

func (c *DefectdojoClient) CreateProductType(name string) (*ProductType, error)

func (*DefectdojoClient) DoGet

func (c *DefectdojoClient) DoGet(api_path string, params map[string]string) (*http.Response, error)

func (*DefectdojoClient) DoPost

func (c *DefectdojoClient) DoPost(api_path string, req_payload *bytes.Buffer, content_type string) (*http.Response, error)

func (*DefectdojoClient) DoRequest

func (c *DefectdojoClient) DoRequest(req *http.Request) (*http.Response, error)

func (*DefectdojoClient) GetEngagement

func (c *DefectdojoClient) GetEngagement(id string) (*Engagement, error)

func (*DefectdojoClient) GetEngagementForReportType

func (c *DefectdojoClient) GetEngagementForReportType(p *Product, report_type string) (*Engagement, error)

func (*DefectdojoClient) GetProduct

func (c *DefectdojoClient) GetProduct(name string) (*Product, error)

func (*DefectdojoClient) GetProductType

func (c *DefectdojoClient) GetProductType(name string) (*ProductType, error)

func (*DefectdojoClient) UploadReport

func (c *DefectdojoClient) UploadReport(engagement_id int, report_type string, report_bytez []byte) (*Engagement, error)

type Engagement

type Engagement struct {
	EngagementId           int    `json:"id,omitempty"`
	EngagementIdFromUpload int    `json:"engagement,omitempty"`
	ProductId              int    `json:"product"`
	StartDate              string `json:"target_start"`
	EndDate                string `json:"target_end"`
	EngagementType         string `json:"engagement_type"`
	EngagementStatus       string `json:"status,omitempty"`
	EngagementName         string `json:"name"`
}

type EngagementSearchResults

type EngagementSearchResults struct {
	Count          int          `json:"count"`
	EngagementList []Engagement `json:"results"`
}

type PostErrors

type PostErrors struct {
	NonFieldErrors []string `json:"non_field_errors"`
	FileErrors     []string `json:"file"`
}

type Product

type Product struct {
	Name          string `json:"name"`
	Id            int    `json:"id,omitempty"`
	ProductTypeId int    `json:"prod_type"`
	Description   string `json:"description"`
}

type ProductSearchResults

type ProductSearchResults struct {
	ProductList []Product `json:"results"`
}

type ProductType

type ProductType struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type ProductTypeSearchResults

type ProductTypeSearchResults struct {
	ProductTypeList []ProductType `json:"results"`
}

type Report

type Report struct {
	FilePath   string
	ReportType string
}

Jump to

Keyboard shortcuts

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