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) GetRoles() ([]byte, error)
- func (c *APIClient) GetSamlIdentityProviders() ([]byte, error)
- func (c *APIClient) GetSamlRoleMappings() ([]byte, error)
- func (c *APIClient) GetSamlTeamMappings() ([]*SamlTeamMapping, error)
- func (c *APIClient) GetTeams() ([]*Team, error)
- func (c *APIClient) GetTriagedResultsByScanID(scanID int) (*[]TriagedScanResult, error)
- func (c *APIClient) GetUsers() ([]*User, 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 SamlTeamMapping
- type StatusResponse
- type Team
- type TriagedScanResult
- type User
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) GetSamlIdentityProviders ¶
func (*APIClient) GetSamlRoleMappings ¶
func (*APIClient) GetSamlTeamMappings ¶
func (c *APIClient) GetSamlTeamMappings() ([]*SamlTeamMapping, error)
func (*APIClient) GetTriagedResultsByScanID ¶
func (c *APIClient) GetTriagedResultsByScanID(scanID int) (*[]TriagedScanResult, error)
type AccessToken ¶
type Client ¶
type Client interface {
Authenticate(username, password string) error
PostResponseBody(endpoint string, body io.Reader) ([]byte, error)
GetUsers() ([]*User, error)
GetRoles() ([]byte, error)
GetTeams() ([]*Team, error)
GetLdapServers() ([]byte, error)
GetLdapRoleMappings() ([]byte, error)
GetLdapTeamMappings() ([]byte, error)
GetSamlIdentityProviders() ([]byte, error)
GetSamlRoleMappings() ([]byte, error)
GetSamlTeamMappings() ([]*SamlTeamMapping, 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 SamlTeamMapping ¶ added in v1.0.3
type StatusResponse ¶
type TriagedScanResult ¶
type TriagedScanResult struct {
ID int `json:"Id"`
}
type User ¶ added in v1.0.3
type User struct {
ID int `json:"id"`
UserName string `json:"userName"`
LastLoginDate string `json:"lastLoginDate"`
RoleIDs []int `json:"roleIds"`
TeamIDs []int `json:"teamIds"`
AuthenticationProviderID int `json:"authenticationProviderId"`
CreationDate string `json:"creationDate"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
PhoneNumber string `json:"phoneNumber"`
CellPhoneNumber string `json:"cellPhoneNumber"`
JobTitle string `json:"jobTitle"`
Other string `json:"other"`
Country string `json:"country"`
Active bool `json:"active"`
ExpirationDate string `json:"expirationDate"`
AllowedIPList []string `json:"allowedIpList"`
LocaleID int `json:"localeId"`
}
Click to show internal directories.
Click to hide internal directories.