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)
- func GetFilterForProjects(fromDate, teamName, projectIds string) string
- func GetFilterForProjectsWithLastScan(fromDate, teamName, projectIds string) string
- 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) GetEngineServers() ([]*EngineServer, error)
- func (c *APIClient) GetLdapRoleMappings() ([]byte, error)
- func (c *APIClient) GetLdapServers() ([]byte, error)
- func (c *APIClient) GetLdapTeamMappings() ([]byte, error)
- func (c *APIClient) GetPresets() ([]*PresetShort, error)
- func (c *APIClient) GetProjects(fromDate, teamName, projectIds string, offset, limit int) ([]*Project, error)
- func (c *APIClient) GetProjectsWithLastScanID(fromDate, teamName, projectsIds 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 Configuration
- type CustomField
- type EngineServer
- type LinkEngineServer
- type ODataProjectsWithCustomFields
- type ODataProjectsWithLastScanID
- type ODataTriagedResultsByScan
- type OfflineReasonCodeEngineServer
- type PresetShort
- type Project
- type ProjectOData
- type ProjectWithCustomFields
- type ProjectWithLastScanID
- type ReportRequest
- type ReportResponse
- type Retry
- type RetryableHTTPAdapter
- type SamlTeamMapping
- type StatusEngineServer
- 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 CreateRequest ¶
func CreateRequest(httpMethod, requestURL string, requestBody io.Reader, token *AccessToken) (*retryablehttp.Request, error)
func GetFilterForProjects ¶ added in v1.0.4
GetFilterForProjects get filter string for projects list
func GetFilterForProjectsWithLastScan ¶ added in v1.0.4
GetFilterForProjectsWithLastScan get filter string for projects list with last scan
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) GetEngineServers ¶ added in v1.2.0
func (c *APIClient) GetEngineServers() ([]*EngineServer, error)
func (*APIClient) GetLdapRoleMappings ¶
func (*APIClient) GetLdapServers ¶
func (*APIClient) GetLdapTeamMappings ¶
func (*APIClient) GetPresets ¶ added in v1.0.4
func (c *APIClient) GetPresets() ([]*PresetShort, error)
func (*APIClient) GetProjects ¶ added in v1.0.4
func (*APIClient) GetProjectsWithLastScanID ¶
func (c *APIClient) GetProjectsWithLastScanID(fromDate, teamName, projectsIds 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) GetProjects(fromDate, teamName, projectIds string, offset, limit int) ([]*Project, error) GetPresets() ([]*PresetShort, error) GetLdapServers() ([]byte, error) GetLdapRoleMappings() ([]byte, error) GetLdapTeamMappings() ([]byte, error) GetSamlIdentityProviders() ([]byte, error) GetSamlRoleMappings() ([]byte, error) GetSamlTeamMappings() ([]*SamlTeamMapping, error) GetProjectsWithLastScanID(fromDate, teamName, projectsIds string, offset, limit int) (*[]ProjectWithLastScanID, error) GetTriagedResultsByScanID(scanID int) (*[]TriagedScanResult, error) CreateScanReport(scanID int, reportType string, retry Retry) ([]byte, error) GetEngineServers() ([]*EngineServer, error) }
type Configuration ¶ added in v1.0.4
type Configuration struct {
CustomFields []*CustomField `json:"customFields"`
}
type CustomField ¶ added in v1.0.4
type EngineServer ¶ added in v1.2.0
type EngineServer struct { ID int `json:"id"` Name string `json:"name"` URI string `json:"uri"` MinLoc int `json:"minLoc"` MaxLoc int `json:"maxLoc"` MaxScans int `json:"maxScans"` CxVersion string `json:"cxVersion"` OperatingSystem string `json:"operatingSystem"` Status StatusEngineServer `json:"status"` Link LinkEngineServer `json:"link"` OfflineReasonCode OfflineReasonCodeEngineServer `json:"offlineReasonCode"` OfflineReasonMessage string `json:"offlineReasonMessage"` OfflineReasonMessageParameters string `json:"offlineReasonMessageParameters"` }
type LinkEngineServer ¶ added in v1.2.0
type ODataProjectsWithCustomFields ¶ added in v1.0.4
type ODataProjectsWithCustomFields struct {
Value []ProjectWithCustomFields `json:"value"`
}
type ODataProjectsWithLastScanID ¶
type ODataProjectsWithLastScanID struct { OdataContext string `json:"@odata.context"` Value []ProjectWithLastScanID `json:"value"` }
type ODataTriagedResultsByScan ¶
type ODataTriagedResultsByScan struct {
Value []TriagedScanResult
}
type OfflineReasonCodeEngineServer ¶ added in v1.2.0
type PresetShort ¶ added in v1.0.4
type ProjectOData ¶ added in v1.0.4
type ProjectOData struct { ID int `json:"Id"` CreatedDate string `json:"CreatedDate"` CustomFields []*CustomField `json:"CustomFields"` }
type ProjectWithCustomFields ¶ added in v1.0.4
type ProjectWithLastScanID ¶
type ReportRequest ¶
type ReportResponse ¶
type RetryableHTTPAdapter ¶
type SamlTeamMapping ¶ added in v1.0.3
type StatusEngineServer ¶ added in v1.2.0
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.