Documentation ¶
Index ¶
- Variables
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func Int(v int) *int
- func Int64(v int64) *int64
- func String(v string) *string
- func Stringify(message interface{}) string
- type AuthenticationService
- type Client
- type Ping
- type Response
- type ScanAlert
- type ScanArtifactRequest
- type ScanArtifactResponse
- type ScanBannedLicense
- type ScanBuildRequest
- type ScanBuildResponse
- type ScanChecksum
- type ScanDetail
- type ScanImpactedArtifact
- func (s *ScanImpactedArtifact) GetDepth() string
- func (s *ScanImpactedArtifact) GetDisplayName() string
- func (s *ScanImpactedArtifact) GetInfectedFiles() []ScanInfectedFile
- func (s *ScanImpactedArtifact) GetName() string
- func (s *ScanImpactedArtifact) GetParentSha() string
- func (s *ScanImpactedArtifact) GetPath() string
- func (s *ScanImpactedArtifact) GetPkgType() string
- func (s *ScanImpactedArtifact) GetSha1() string
- func (s *ScanImpactedArtifact) GetSha256() string
- type ScanInfectedFile
- func (s *ScanInfectedFile) GetComponentID() string
- func (s *ScanInfectedFile) GetDepth() string
- func (s *ScanInfectedFile) GetDetails() []ScanDetail
- func (s *ScanInfectedFile) GetDisplayName() string
- func (s *ScanInfectedFile) GetName() string
- func (s *ScanInfectedFile) GetParentSha() string
- func (s *ScanInfectedFile) GetPath() string
- func (s *ScanInfectedFile) GetPkgType() string
- func (s *ScanInfectedFile) GetSha1() string
- func (s *ScanInfectedFile) GetSha256() string
- type ScanIssue
- func (s *ScanIssue) GetCreated() Timestamp
- func (s *ScanIssue) GetCve() string
- func (s *ScanIssue) GetDescription() string
- func (s *ScanIssue) GetImpactedArtifacts() []ScanImpactedArtifact
- func (s *ScanIssue) GetProvider() string
- func (s *ScanIssue) GetSeverity() string
- func (s *ScanIssue) GetSummary() string
- func (s *ScanIssue) GetType() string
- type ScanLicense
- type ScanService
- type ScanSummary
- type ScanVulnerability
- type SummaryArtifact
- type SummaryArtifactRequest
- type SummaryCve
- type SummaryError
- type SummaryGeneral
- type SummaryIssue
- func (s *SummaryIssue) GetCreated() string
- func (s *SummaryIssue) GetCves() []SummaryCve
- func (s *SummaryIssue) GetDescription() string
- func (s *SummaryIssue) GetImpactPath() []string
- func (s *SummaryIssue) GetIssueType() string
- func (s *SummaryIssue) GetProvider() string
- func (s *SummaryIssue) GetSeverity() string
- func (s *SummaryIssue) GetSummary() string
- type SummaryLicense
- type SummaryResponse
- type SummaryService
- type SystemService
- type Timestamp
- type User
- type UsersService
- func (s *UsersService) Create(user *User) (*User, *Response, error)
- func (s *UsersService) Delete(user string) (*string, *Response, error)
- func (s *UsersService) Get(user string) (*User, *Response, error)
- func (s *UsersService) GetAll() (*[]User, *Response, error)
- func (s *UsersService) Update(user *User) (*string, *Response, error)
- type Versions
Constants ¶
This section is empty.
Variables ¶
var ( // VersionMajor is for an API incompatible changes VersionMajor int64 = 2 // VersionMinor is for functionality in a backwards-compatible manner VersionMinor int64 = 1 // VersionPatch is for backwards-compatible bug fixes VersionPatch int64 )
var Version = semver.Version{ Major: VersionMajor, Minor: VersionMinor, Patch: VersionPatch, }
Version represents the minimum version of the Artifactory API this library supports
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range.
func Int ¶
Int is a helper routine that allocates a new int value to store v and returns a pointer to it.
func Int64 ¶
Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.
Types ¶
type AuthenticationService ¶
type AuthenticationService struct {
// contains filtered or unexported fields
}
AuthenticationService contains authentication related functions.
func (*AuthenticationService) HasAuth ¶
func (s *AuthenticationService) HasAuth() bool
HasAuth checks if the auth type is set.
func (*AuthenticationService) HasBasicAuth ¶
func (s *AuthenticationService) HasBasicAuth() bool
HasBasicAuth checks if the auth type is HTTP Basic auth.
func (*AuthenticationService) HasTokenAuth ¶
func (s *AuthenticationService) HasTokenAuth() bool
HasTokenAuth checks if the auth type is Token auth.
func (*AuthenticationService) SetBasicAuth ¶
func (s *AuthenticationService) SetBasicAuth(username, password string)
SetBasicAuth sets the auth type as HTTP Basic auth.
func (*AuthenticationService) SetTokenAuth ¶
func (s *AuthenticationService) SetTokenAuth(token string)
SetTokenAuth sets the auth type as Token auth.
type Client ¶
type Client struct { // User agent used when communicating with the Xray API. UserAgent string // Xray service for authentication. Authentication *AuthenticationService Scan *ScanService Summary *SummaryService System *SystemService Users *UsersService // contains filtered or unexported fields }
Client is a client that manages communication with the Xray API.
func NewClient ¶
NewClient returns a new Xray API client. baseUrl has to be the HTTP endpoint of the Xray API. If no httpClient is provided, then the http.DefaultClient will be used.
func (*Client) Call ¶
Call is a combine function for Client.NewRequest and Client.Do.
Most API methods are quite the same. Get the URL, apply options, make a request, and get the response. Without adding special headers or something. To avoid a big amount of code duplication you can Client.Call.
method is the HTTP method you want to call. u is the URL you want to call. body is the HTTP body. v is the HTTP response.
For more information read https://github.com/google/go-github/issues/234
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the baseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type Ping ¶
type Ping struct {
Status *string `json:"status,omitempty"`
}
Ping represents the ping response status from Xray
type Response ¶
Response represents an Xray API response. This wraps the standard http.Response returned from Xray.
type ScanAlert ¶
type ScanAlert struct { Created *Timestamp `json:"created,omitempty"` Issues *[]ScanIssue `json:"issues,omitempty"` TopSeverity *string `json:"top_severity,omitempty"` WatchName *string `json:"watch_name,omitempty"` }
ScanAlert represents an alert of the scan in Xray.
func (*ScanAlert) GetCreated ¶
GetCreated returns the Created field if it's non-nil, zero value otherwise.
func (*ScanAlert) GetIssues ¶
GetIssues returns the Issues field if it's non-nil, zero value otherwise.
func (*ScanAlert) GetTopSeverity ¶
GetTopSeverity returns the TopSeverity field if it's non-nil, zero value otherwise.
func (*ScanAlert) GetWatchName ¶
GetWatchName returns the WatchName field if it's non-nil, zero value otherwise.
type ScanArtifactRequest ¶
type ScanArtifactRequest struct { Checksum *ScanChecksum `json:"checksum,omitempty"` ComponentID *string `json:"componentId,omitempty"` Summary *string `json:"summary,omitempty"` }
ScanArtifactRequest represents the ScanArtifact request we send to Xray.
func (*ScanArtifactRequest) GetChecksum ¶
func (s *ScanArtifactRequest) GetChecksum() *ScanChecksum
GetChecksum returns the Checksum field.
func (*ScanArtifactRequest) GetComponentID ¶
func (s *ScanArtifactRequest) GetComponentID() string
GetComponentID returns the ComponentID field if it's non-nil, zero value otherwise.
func (*ScanArtifactRequest) GetSummary ¶
func (s *ScanArtifactRequest) GetSummary() string
GetSummary returns the Summary field if it's non-nil, zero value otherwise.
type ScanArtifactResponse ¶
type ScanArtifactResponse struct {
Info *string `json:"info,omitempty"`
}
ScanArtifactResponse represents the response from scanning an artifact in Xray.
func (*ScanArtifactResponse) GetInfo ¶
func (s *ScanArtifactResponse) GetInfo() string
GetInfo returns the Info field if it's non-nil, zero value otherwise.
func (ScanArtifactResponse) String ¶
func (s ScanArtifactResponse) String() string
type ScanBannedLicense ¶
type ScanBannedLicense struct { AlertType *string `json:"alert_type,omitempty"` Description *string `json:"description,omitempty"` ID *struct{} `json:"id,omitempty"` // We don't have any build examples Severity *string `json:"severity,omitempty"` Summary *string `json:"summary,omitempty"` }
ScanBannedLicense represents the banned license of a scan in Xray.
func (*ScanBannedLicense) GetAlertType ¶
func (s *ScanBannedLicense) GetAlertType() string
GetAlertType returns the AlertType field if it's non-nil, zero value otherwise.
func (*ScanBannedLicense) GetDescription ¶
func (s *ScanBannedLicense) GetDescription() string
GetDescription returns the Description field if it's non-nil, zero value otherwise.
func (*ScanBannedLicense) GetSeverity ¶
func (s *ScanBannedLicense) GetSeverity() string
GetSeverity returns the Severity field if it's non-nil, zero value otherwise.
func (*ScanBannedLicense) GetSummary ¶
func (s *ScanBannedLicense) GetSummary() string
GetSummary returns the Summary field if it's non-nil, zero value otherwise.
type ScanBuildRequest ¶
type ScanBuildRequest struct { ArtifactoryID *string `json:"artifactoryId,omitempty"` BuildName *string `json:"buildName,omitempty"` BuildNumber *string `json:"buildNumber,omitempty"` }
ScanBuildRequest represents the scan build request we send to Xray.
func (*ScanBuildRequest) GetArtifactoryID ¶
func (s *ScanBuildRequest) GetArtifactoryID() string
GetArtifactoryID returns the ArtifactoryID field if it's non-nil, zero value otherwise.
func (*ScanBuildRequest) GetBuildName ¶
func (s *ScanBuildRequest) GetBuildName() string
GetBuildName returns the BuildName field if it's non-nil, zero value otherwise.
func (*ScanBuildRequest) GetBuildNumber ¶
func (s *ScanBuildRequest) GetBuildNumber() string
GetBuildNumber returns the BuildNumber field if it's non-nil, zero value otherwise.
type ScanBuildResponse ¶
type ScanBuildResponse struct { Summary *ScanSummary `json:"summary,omitempty"` Alerts *[]ScanAlert `json:"alerts,omitempty"` Licenses *[]ScanLicense `json:"licenses,omitempty"` }
ScanBuildResponse represents the response from scanning a build in Xray.
func (*ScanBuildResponse) GetAlerts ¶
func (s *ScanBuildResponse) GetAlerts() []ScanAlert
GetAlerts returns the Alerts field if it's non-nil, zero value otherwise.
func (*ScanBuildResponse) GetLicenses ¶
func (s *ScanBuildResponse) GetLicenses() []ScanLicense
GetLicenses returns the Licenses field if it's non-nil, zero value otherwise.
func (*ScanBuildResponse) GetSummary ¶
func (s *ScanBuildResponse) GetSummary() *ScanSummary
GetSummary returns the Summary field.
func (ScanBuildResponse) String ¶
func (s ScanBuildResponse) String() string
type ScanChecksum ¶
type ScanChecksum struct { Md5 *string `json:"md5,omitempty"` Sha1 *string `json:"sha1,omitempty"` Sha256 *string `json:"sha256,omitempty"` }
ScanChecksum represents the checksums used in the scan artifact request in Xray.
func (*ScanChecksum) GetMd5 ¶
func (s *ScanChecksum) GetMd5() string
GetMd5 returns the Md5 field if it's non-nil, zero value otherwise.
func (*ScanChecksum) GetSha1 ¶
func (s *ScanChecksum) GetSha1() string
GetSha1 returns the Sha1 field if it's non-nil, zero value otherwise.
func (*ScanChecksum) GetSha256 ¶
func (s *ScanChecksum) GetSha256() string
GetSha256 returns the Sha256 field if it's non-nil, zero value otherwise.
type ScanDetail ¶
type ScanDetail struct { BannedLicenses *[]ScanBannedLicense `json:"banned_licenses,omitempty"` Child *string `json:"child,omitempty"` Vulnerabilities *[]ScanVulnerability `json:"vulnerabilities,omitempty"` }
ScanDetail represents the detail of a scan in Xray.
func (*ScanDetail) GetBannedLicenses ¶
func (s *ScanDetail) GetBannedLicenses() []ScanBannedLicense
GetBannedLicenses returns the BannedLicenses field if it's non-nil, zero value otherwise.
func (*ScanDetail) GetChild ¶
func (s *ScanDetail) GetChild() string
GetChild returns the Child field if it's non-nil, zero value otherwise.
func (*ScanDetail) GetVulnerabilities ¶
func (s *ScanDetail) GetVulnerabilities() []ScanVulnerability
GetVulnerabilities returns the Vulnerabilities field if it's non-nil, zero value otherwise.
type ScanImpactedArtifact ¶
type ScanImpactedArtifact struct { Depth *string `json:"depth,omitempty"` DisplayName *string `json:"display_name,omitempty"` InfectedFiles *[]ScanInfectedFile `json:"infected_files,omitempty"` Name *string `json:"name,omitempty"` ParentSha *string `json:"parent_sha,omitempty"` Path *string `json:"path,omitempty"` PkgType *string `json:"pkg_type,omitempty"` Sha1 *string `json:"sha1,omitempty"` Sha256 *string `json:"sha256,omitempty"` }
ScanImpactedArtifact represents the impacted artifact of a scan in Xray.
func (*ScanImpactedArtifact) GetDepth ¶
func (s *ScanImpactedArtifact) GetDepth() string
GetDepth returns the Depth field if it's non-nil, zero value otherwise.
func (*ScanImpactedArtifact) GetDisplayName ¶
func (s *ScanImpactedArtifact) GetDisplayName() string
GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.
func (*ScanImpactedArtifact) GetInfectedFiles ¶
func (s *ScanImpactedArtifact) GetInfectedFiles() []ScanInfectedFile
GetInfectedFiles returns the InfectedFiles field if it's non-nil, zero value otherwise.
func (*ScanImpactedArtifact) GetName ¶
func (s *ScanImpactedArtifact) GetName() string
GetName returns the Name field if it's non-nil, zero value otherwise.
func (*ScanImpactedArtifact) GetParentSha ¶
func (s *ScanImpactedArtifact) GetParentSha() string
GetParentSha returns the ParentSha field if it's non-nil, zero value otherwise.
func (*ScanImpactedArtifact) GetPath ¶
func (s *ScanImpactedArtifact) GetPath() string
GetPath returns the Path field if it's non-nil, zero value otherwise.
func (*ScanImpactedArtifact) GetPkgType ¶
func (s *ScanImpactedArtifact) GetPkgType() string
GetPkgType returns the PkgType field if it's non-nil, zero value otherwise.
func (*ScanImpactedArtifact) GetSha1 ¶
func (s *ScanImpactedArtifact) GetSha1() string
GetSha1 returns the Sha1 field if it's non-nil, zero value otherwise.
func (*ScanImpactedArtifact) GetSha256 ¶
func (s *ScanImpactedArtifact) GetSha256() string
GetSha256 returns the Sha256 field if it's non-nil, zero value otherwise.
type ScanInfectedFile ¶
type ScanInfectedFile struct { ComponentID *string `json:"component_id,omitempty"` Depth *string `json:"depth,omitempty"` Details *[]ScanDetail `json:"details,omitempty"` DisplayName *string `json:"display_name,omitempty"` Name *string `json:"name,omitempty"` ParentSha *string `json:"parent_sha,omitempty"` Path *string `json:"path,omitempty"` PkgType *string `json:"pkg_type,omitempty"` Sha1 *string `json:"sha1,omitempty"` Sha256 *string `json:"sha256,omitempty"` }
ScanInfectedFile represents the infected file of a scan in Xray.
func (*ScanInfectedFile) GetComponentID ¶
func (s *ScanInfectedFile) GetComponentID() string
GetComponentID returns the ComponentID field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetDepth ¶
func (s *ScanInfectedFile) GetDepth() string
GetDepth returns the Depth field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetDetails ¶
func (s *ScanInfectedFile) GetDetails() []ScanDetail
GetDetails returns the Details field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetDisplayName ¶
func (s *ScanInfectedFile) GetDisplayName() string
GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetName ¶
func (s *ScanInfectedFile) GetName() string
GetName returns the Name field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetParentSha ¶
func (s *ScanInfectedFile) GetParentSha() string
GetParentSha returns the ParentSha field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetPath ¶
func (s *ScanInfectedFile) GetPath() string
GetPath returns the Path field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetPkgType ¶
func (s *ScanInfectedFile) GetPkgType() string
GetPkgType returns the PkgType field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetSha1 ¶
func (s *ScanInfectedFile) GetSha1() string
GetSha1 returns the Sha1 field if it's non-nil, zero value otherwise.
func (*ScanInfectedFile) GetSha256 ¶
func (s *ScanInfectedFile) GetSha256() string
GetSha256 returns the Sha256 field if it's non-nil, zero value otherwise.
type ScanIssue ¶
type ScanIssue struct { Created *Timestamp `json:"created,omitempty"` Cve *string `json:"cve,omitempty"` Description *string `json:"description,omitempty"` ImpactedArtifacts *[]ScanImpactedArtifact `json:"impacted_artifacts,omitempty"` Provider *string `json:"provider,omitempty"` Severity *string `json:"severity,omitempty"` Summary *string `json:"summary,omitempty"` Type *string `json:"type,omitempty"` }
ScanIssue represents a issue of the scan in Xray.
func (*ScanIssue) GetCreated ¶
GetCreated returns the Created field if it's non-nil, zero value otherwise.
func (*ScanIssue) GetDescription ¶
GetDescription returns the Description field if it's non-nil, zero value otherwise.
func (*ScanIssue) GetImpactedArtifacts ¶
func (s *ScanIssue) GetImpactedArtifacts() []ScanImpactedArtifact
GetImpactedArtifacts returns the ImpactedArtifacts field if it's non-nil, zero value otherwise.
func (*ScanIssue) GetProvider ¶
GetProvider returns the Provider field if it's non-nil, zero value otherwise.
func (*ScanIssue) GetSeverity ¶
GetSeverity returns the Severity field if it's non-nil, zero value otherwise.
func (*ScanIssue) GetSummary ¶
GetSummary returns the Summary field if it's non-nil, zero value otherwise.
type ScanLicense ¶
type ScanLicense struct { Components *[]string `json:"components,omitempty"` FullName *string `json:"full_name,omitempty"` MoreInfoURL *[]string `json:"more_info_url,omitempty"` Name *string `json:"name,omitempty"` }
ScanLicense represents the licence found from a scan in Xray.
func (*ScanLicense) GetComponents ¶
func (s *ScanLicense) GetComponents() []string
GetComponents returns the Components field if it's non-nil, zero value otherwise.
func (*ScanLicense) GetFullName ¶
func (s *ScanLicense) GetFullName() string
GetFullName returns the FullName field if it's non-nil, zero value otherwise.
func (*ScanLicense) GetMoreInfoURL ¶
func (s *ScanLicense) GetMoreInfoURL() []string
GetMoreInfoURL returns the MoreInfoURL field if it's non-nil, zero value otherwise.
func (*ScanLicense) GetName ¶
func (s *ScanLicense) GetName() string
GetName returns the Name field if it's non-nil, zero value otherwise.
type ScanService ¶
type ScanService service
ScanService handles communication with the scan related methods of the Xray API.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-SCAN
func (*ScanService) Artifact ¶
func (s *ScanService) Artifact(scan *ScanArtifactRequest) (*ScanArtifactResponse, *Response, error)
Artifact invokes scanning of an artifact.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-ScanArtifact
func (*ScanService) Build ¶
func (s *ScanService) Build(scan *ScanBuildRequest) (*ScanBuildResponse, *Response, error)
Build invokes scanning of a build that was uploaded to Artifactory as requested by a CI server.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-ScanBuild
type ScanSummary ¶
type ScanSummary struct { FailBuild *bool `json:"fail_build,omitempty"` Message *string `json:"message,omitempty"` MoreDetailsURL *string `json:"more_details_url,omitempty"` TotalAlerts *string `json:"total_alerts,omitempty"` }
ScanSummary represents a summary of the scan in Xray.
func (*ScanSummary) GetFailBuild ¶
func (s *ScanSummary) GetFailBuild() bool
GetFailBuild returns the FailBuild field if it's non-nil, zero value otherwise.
func (*ScanSummary) GetMessage ¶
func (s *ScanSummary) GetMessage() string
GetMessage returns the Message field if it's non-nil, zero value otherwise.
func (*ScanSummary) GetMoreDetailsURL ¶
func (s *ScanSummary) GetMoreDetailsURL() string
GetMoreDetailsURL returns the MoreDetailsURL field if it's non-nil, zero value otherwise.
func (*ScanSummary) GetTotalAlerts ¶
func (s *ScanSummary) GetTotalAlerts() string
GetTotalAlerts returns the TotalAlerts field if it's non-nil, zero value otherwise.
type ScanVulnerability ¶
type ScanVulnerability struct { AlertType *string `json:"alert_type,omitempty"` Description *string `json:"description,omitempty"` ID *struct{} `json:"id,omitempty"` // We don't have any build examples Severity *string `json:"severity,omitempty"` Summary *string `json:"summary,omitempty"` }
ScanVulnerability represents the vulnerability found from a scan in Xray.
func (*ScanVulnerability) GetAlertType ¶
func (s *ScanVulnerability) GetAlertType() string
GetAlertType returns the AlertType field if it's non-nil, zero value otherwise.
func (*ScanVulnerability) GetDescription ¶
func (s *ScanVulnerability) GetDescription() string
GetDescription returns the Description field if it's non-nil, zero value otherwise.
func (*ScanVulnerability) GetSeverity ¶
func (s *ScanVulnerability) GetSeverity() string
GetSeverity returns the Severity field if it's non-nil, zero value otherwise.
func (*ScanVulnerability) GetSummary ¶
func (s *ScanVulnerability) GetSummary() string
GetSummary returns the Summary field if it's non-nil, zero value otherwise.
type SummaryArtifact ¶
type SummaryArtifact struct { General *SummaryGeneral `json:"general,omitempty"` Issues *[]SummaryIssue `json:"issues,omitempty"` Licenses *[]SummaryLicense `json:"licenses,omitempty"` }
SummaryArtifact represents a artifact within the summary in Xray.
func (*SummaryArtifact) GetGeneral ¶
func (s *SummaryArtifact) GetGeneral() *SummaryGeneral
GetGeneral returns the General field.
func (*SummaryArtifact) GetIssues ¶
func (s *SummaryArtifact) GetIssues() []SummaryIssue
GetIssues returns the Issues field if it's non-nil, zero value otherwise.
func (*SummaryArtifact) GetLicenses ¶
func (s *SummaryArtifact) GetLicenses() []SummaryLicense
GetLicenses returns the Licenses field if it's non-nil, zero value otherwise.
type SummaryArtifactRequest ¶
type SummaryArtifactRequest struct { Checksums *[]string `json:"checksums,omitempty"` Paths *[]string `json:"paths,omitempty"` }
SummaryArtifactRequest represents the SummaryRequest request we send to Xray.
func (*SummaryArtifactRequest) GetChecksums ¶
func (s *SummaryArtifactRequest) GetChecksums() []string
GetChecksums returns the Checksums field if it's non-nil, zero value otherwise.
func (*SummaryArtifactRequest) GetPaths ¶
func (s *SummaryArtifactRequest) GetPaths() []string
GetPaths returns the Paths field if it's non-nil, zero value otherwise.
type SummaryCve ¶
type SummaryCve struct { Cve *string `json:"cve,omitempty"` Cwe *[]string `json:"cwe,omitempty"` Cvss2 *string `json:"cvss_v2,omitempty"` Cvss3 *string `json:"cvss_v3,omitempty"` }
SummaryCve resprents the cves within the summary from Xray
func (*SummaryCve) GetCve ¶
func (s *SummaryCve) GetCve() string
GetCve returns the Cve field if it's non-nil, zero value otherwise.
func (*SummaryCve) GetCvss2 ¶
func (s *SummaryCve) GetCvss2() string
GetCvss2 returns the Cvss2 field if it's non-nil, zero value otherwise.
func (*SummaryCve) GetCvss3 ¶
func (s *SummaryCve) GetCvss3() string
GetCvss3 returns the Cvss3 field if it's non-nil, zero value otherwise.
func (*SummaryCve) GetCwe ¶
func (s *SummaryCve) GetCwe() []string
GetCwe returns the Cwe field if it's non-nil, zero value otherwise.
type SummaryError ¶
type SummaryError struct { Error *string `json:"error,omitempty"` Identifier *string `json:"identifier,omitempty"` }
SummaryError represents an error from a summery in Xray.
func (*SummaryError) GetError ¶
func (s *SummaryError) GetError() string
GetError returns the Error field if it's non-nil, zero value otherwise.
func (*SummaryError) GetIdentifier ¶
func (s *SummaryError) GetIdentifier() string
GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.
type SummaryGeneral ¶
type SummaryGeneral struct { ComponentID *string `json:"component_id,omitempty"` Name *string `json:"name,omitempty"` Path *string `json:"path,omitempty"` PkgType *string `json:"pkg_type,omitempty"` Sha256 *string `json:"sha256,omitempty"` }
SummaryGeneral represents the general information of a summary in Xray.
func (*SummaryGeneral) GetComponentID ¶
func (s *SummaryGeneral) GetComponentID() string
GetComponentID returns the ComponentID field if it's non-nil, zero value otherwise.
func (*SummaryGeneral) GetName ¶
func (s *SummaryGeneral) GetName() string
GetName returns the Name field if it's non-nil, zero value otherwise.
func (*SummaryGeneral) GetPath ¶
func (s *SummaryGeneral) GetPath() string
GetPath returns the Path field if it's non-nil, zero value otherwise.
func (*SummaryGeneral) GetPkgType ¶
func (s *SummaryGeneral) GetPkgType() string
GetPkgType returns the PkgType field if it's non-nil, zero value otherwise.
func (*SummaryGeneral) GetSha256 ¶
func (s *SummaryGeneral) GetSha256() string
GetSha256 returns the Sha256 field if it's non-nil, zero value otherwise.
type SummaryIssue ¶
type SummaryIssue struct { Created *string `json:"created,omitempty"` Description *string `json:"description,omitempty"` ImpactPath *[]string `json:"impact_path,omitempty"` IssueType *string `json:"issue_type,omitempty"` Provider *string `json:"provider,omitempty"` Cves *[]SummaryCve `json:"cves,omitempty"` Severity *string `json:"severity,omitempty"` Summary *string `json:"summary,omitempty"` }
SummaryIssue represents a issue within the summary in Xray.
func (*SummaryIssue) GetCreated ¶
func (s *SummaryIssue) GetCreated() string
GetCreated returns the Created field if it's non-nil, zero value otherwise.
func (*SummaryIssue) GetCves ¶
func (s *SummaryIssue) GetCves() []SummaryCve
GetCves returns the Cves field if it's non-nil, zero value otherwise.
func (*SummaryIssue) GetDescription ¶
func (s *SummaryIssue) GetDescription() string
GetDescription returns the Description field if it's non-nil, zero value otherwise.
func (*SummaryIssue) GetImpactPath ¶
func (s *SummaryIssue) GetImpactPath() []string
GetImpactPath returns the ImpactPath field if it's non-nil, zero value otherwise.
func (*SummaryIssue) GetIssueType ¶
func (s *SummaryIssue) GetIssueType() string
GetIssueType returns the IssueType field if it's non-nil, zero value otherwise.
func (*SummaryIssue) GetProvider ¶
func (s *SummaryIssue) GetProvider() string
GetProvider returns the Provider field if it's non-nil, zero value otherwise.
func (*SummaryIssue) GetSeverity ¶
func (s *SummaryIssue) GetSeverity() string
GetSeverity returns the Severity field if it's non-nil, zero value otherwise.
func (*SummaryIssue) GetSummary ¶
func (s *SummaryIssue) GetSummary() string
GetSummary returns the Summary field if it's non-nil, zero value otherwise.
type SummaryLicense ¶
type SummaryLicense struct { Components *[]string `json:"components,omitempty"` FullName *string `json:"full_name,omitempty"` MoreInfoURL *[]string `json:"more_info_url,omitempty"` Name *string `json:"name,omitempty"` }
SummaryLicense represents a licence found from a summary in Xray.
func (*SummaryLicense) GetComponents ¶
func (s *SummaryLicense) GetComponents() []string
GetComponents returns the Components field if it's non-nil, zero value otherwise.
func (*SummaryLicense) GetFullName ¶
func (s *SummaryLicense) GetFullName() string
GetFullName returns the FullName field if it's non-nil, zero value otherwise.
func (*SummaryLicense) GetMoreInfoURL ¶
func (s *SummaryLicense) GetMoreInfoURL() []string
GetMoreInfoURL returns the MoreInfoURL field if it's non-nil, zero value otherwise.
func (*SummaryLicense) GetName ¶
func (s *SummaryLicense) GetName() string
GetName returns the Name field if it's non-nil, zero value otherwise.
type SummaryResponse ¶
type SummaryResponse struct { Artifacts *[]SummaryArtifact `json:"artifacts,omitempty"` Errors *[]SummaryError `json:"errors,omitempty"` }
SummaryResponse represents the response from a summary in Xray.
func (*SummaryResponse) GetArtifacts ¶
func (s *SummaryResponse) GetArtifacts() []SummaryArtifact
GetArtifacts returns the Artifacts field if it's non-nil, zero value otherwise.
func (*SummaryResponse) GetErrors ¶
func (s *SummaryResponse) GetErrors() []SummaryError
GetErrors returns the Errors field if it's non-nil, zero value otherwise.
func (SummaryResponse) String ¶
func (s SummaryResponse) String() string
type SummaryService ¶
type SummaryService service
SummaryService handles communication with the summary related methods of the Xray API.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-SUMMARY
func (*SummaryService) Artifact ¶
func (s *SummaryService) Artifact(summary *SummaryArtifactRequest) (*SummaryResponse, *Response, error)
Artifact provides details about any artifact specified by path identifiers or checksum.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-ArtifactSummary
func (*SummaryService) Build ¶
func (s *SummaryService) Build(buildName string, buildNumber int) (*SummaryResponse, *Response, error)
Build provides details about any build specified by path identifiers or checksum.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-BuildSummary
type SystemService ¶
type SystemService service
SystemService handles communication with the system related methods of the Xray API.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-SUMMARY
func (*SystemService) Ping ¶
func (s *SystemService) Ping() (*Ping, *Response, error)
Ping returns a simple status response.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-PingRequest
func (*SystemService) Version ¶
func (s *SystemService) Version() (*Versions, *Response, error)
Version returns information about the current version.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-GetVersion
type Timestamp ¶
Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an RFC3339 or ISO 8601 or Unix timestamp. This is necessary for some fields since the Xray API is inconsistent in how it represents times. All exported methods of time.Time can be called on Timestamp.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in RFC3339 or ISO 8601 or Unix format.
type User ¶
type User struct { Admin *bool `json:"admin,omitempty"` Email *string `json:"email,omitempty"` Name *string `json:"name,omitempty"` Password *string `json:"password,omitempty"` }
User represents a user in Xray.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-USERMANAGEMENT
func (*User) GetPassword ¶
GetPassword returns the Password field if it's non-nil, zero value otherwise.
type UsersService ¶
type UsersService service
UsersService handles communication with the user related methods of the Xray API.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-SUMMARY
func (*UsersService) Create ¶
func (s *UsersService) Create(user *User) (*User, *Response, error)
Create constructs a new User with the provided details.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-CreateUser
func (*UsersService) Delete ¶
func (s *UsersService) Delete(user string) (*string, *Response, error)
Delete removes the provided user.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-DeleteUser
func (*UsersService) Get ¶
func (s *UsersService) Get(user string) (*User, *Response, error)
Get returns the provided user.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-GetUsers/GetUser
func (*UsersService) GetAll ¶
func (s *UsersService) GetAll() (*[]User, *Response, error)
GetAll returns a list of all users.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-GetUsers/GetUser
func (*UsersService) Update ¶
func (s *UsersService) Update(user *User) (*string, *Response, error)
Update modifies a user with the provided details.
Docs: https://www.jfrog.com/confluence/display/XRAY/Xray+REST+API#XrayRESTAPI-UpdateUser
type Versions ¶
type Versions struct { XrayVersion *string `json:"xray_version,omitempty"` XrayRevision *string `json:"xray_revision,omitempty"` }
Versions represents the version information about Xray.
func (*Versions) GetXrayRevision ¶
GetXrayRevision returns the XrayRevision field if it's non-nil, zero value otherwise.
func (*Versions) GetXrayVersion ¶
GetXrayVersion returns the XrayVersion field if it's non-nil, zero value otherwise.