Documentation
¶
Index ¶
- Constants
- func CreateAccessTokenRequest(baseURL, username, password string) (*retryablehttp.Request, error)
- func CreateRequest(httpMethod, requestURL string, requestBody io.Reader, token *AccessToken) (*retryablehttp.Request, error)
- type APIClient
- func (c *APIClient) Authenticate(username, password string) error
- func (c *APIClient) CreateScanReport(scanID int, reportType string, retry Retry) ([]byte, error)
- func (c *APIClient) GetLdapRoleMappings() ([]byte, error)
- func (c *APIClient) GetLdapServers() ([]byte, error)
- func (c *APIClient) GetLdapTeamMappings() ([]byte, error)
- func (c *APIClient) GetProjectsWithLastScanID(fromDate string, offset, limit int) (*[]ProjectWithLastScanID, error)
- func (c *APIClient) GetResponseBody(endpoint string) ([]byte, error)
- func (c *APIClient) GetRoles() ([]byte, error)
- func (c *APIClient) GetSamlIdentityProviders() ([]byte, error)
- func (c *APIClient) GetSamlRoleMappings() ([]byte, error)
- func (c *APIClient) GetSamlTeamMappings() ([]byte, error)
- func (c *APIClient) GetTeams() ([]byte, error)
- func (c *APIClient) GetTriagedResultsByScanID(scanID int) (*[]TriagedScanResult, error)
- func (c *APIClient) GetUsers() ([]byte, error)
- func (c *APIClient) PostResponseBody(endpoint string, body io.Reader) ([]byte, error)
- type APIError
- type AccessToken
- type Client
- type ODataProjectsWithLastScanID
- type ODataTriagedResultsByScan
- type ProjectWithLastScanID
- type ReportRequest
- type ReportResponse
- type Retry
- type RetryableHTTPAdapter
- type StatusResponse
- type TriagedScanResult
Constants ¶
View Source
const (
// ScanReportTypeXML defines SAST report type XML
ScanReportTypeXML = "XML"
)
Variables ¶
This section is empty.
Functions ¶
func CreateAccessTokenRequest ¶
func CreateAccessTokenRequest(baseURL, username, password string) (*retryablehttp.Request, error)
func CreateRequest ¶
func CreateRequest(httpMethod, requestURL string, requestBody io.Reader, token *AccessToken) (*retryablehttp.Request, error)
Types ¶
type APIClient ¶
type APIClient struct {
BaseURL string
Adapter RetryableHTTPAdapter
Token *AccessToken
}
func NewSASTClient ¶
func NewSASTClient(baseURL string, adapter RetryableHTTPAdapter) (*APIClient, error)
func (*APIClient) Authenticate ¶
func (*APIClient) CreateScanReport ¶
func (*APIClient) GetLdapRoleMappings ¶
func (*APIClient) GetLdapServers ¶
func (*APIClient) GetLdapTeamMappings ¶
func (*APIClient) GetProjectsWithLastScanID ¶
func (c *APIClient) GetProjectsWithLastScanID(fromDate string, offset, limit int) (*[]ProjectWithLastScanID, error)
func (*APIClient) GetResponseBody ¶
func (*APIClient) GetSamlIdentityProviders ¶
func (*APIClient) GetSamlRoleMappings ¶
func (*APIClient) GetSamlTeamMappings ¶
func (*APIClient) GetTriagedResultsByScanID ¶
func (c *APIClient) GetTriagedResultsByScanID(scanID int) (*[]TriagedScanResult, error)
type AccessToken ¶
type Client ¶
type Client interface {
Authenticate(username, password string) error
GetResponseBody(endpoint string) ([]byte, error)
PostResponseBody(endpoint string, body io.Reader) ([]byte, error)
GetUsers() ([]byte, error)
GetRoles() ([]byte, error)
GetTeams() ([]byte, error)
GetLdapServers() ([]byte, error)
GetLdapRoleMappings() ([]byte, error)
GetLdapTeamMappings() ([]byte, error)
GetSamlIdentityProviders() ([]byte, error)
GetSamlRoleMappings() ([]byte, error)
GetSamlTeamMappings() ([]byte, error)
GetProjectsWithLastScanID(fromDate string, offset, limit int) (*[]ProjectWithLastScanID, error)
GetTriagedResultsByScanID(scanID int) (*[]TriagedScanResult, error)
CreateScanReport(scanID int, reportType string, retry Retry) ([]byte, error)
}
type ODataProjectsWithLastScanID ¶
type ODataProjectsWithLastScanID struct {
OdataContext string `json:"@odata.context"`
Value []ProjectWithLastScanID `json:"value"`
}
type ODataTriagedResultsByScan ¶
type ODataTriagedResultsByScan struct {
Value []TriagedScanResult
}
type ProjectWithLastScanID ¶
type ReportRequest ¶
type ReportResponse ¶
type RetryableHTTPAdapter ¶
type RetryableHTTPAdapter interface {
Do(req *retryablehttp.Request) (*http.Response, error)
}
type StatusResponse ¶
type TriagedScanResult ¶
type TriagedScanResult struct {
ID int `json:"Id"`
}
Click to show internal directories.
Click to hide internal directories.