Documentation ¶
Index ¶
- func IsEqualDependencySlices(actual, other []Dependency) (bool, error)
- func IsEqualModuleSlices(actual, other []Module) (bool, error)
- type AffectedIssue
- type Agent
- type Artifact
- type BuildInfo
- func (targetBuildInfo *BuildInfo) Append(buildInfo *BuildInfo)
- func (targetBuildInfo *BuildInfo) ExcludeEnv(patterns ...string) error
- func (targetBuildInfo *BuildInfo) IncludeEnv(patterns ...string) error
- func (targetBuildInfo *BuildInfo) SetAgentName(agentName string)
- func (targetBuildInfo *BuildInfo) SetAgentVersion(agentVersion string)
- func (targetBuildInfo *BuildInfo) SetBuildAgentVersion(buildAgentVersion string)
- func (targetBuildInfo *BuildInfo) SetPluginVersion(pluginVersion string)
- func (targetBuildInfo *BuildInfo) ToCycloneDxBom() (*cdx.BOM, error)
- type Checksum
- type Dependency
- type Env
- type General
- type Issues
- type Module
- type ModuleType
- type Partial
- type Partials
- type PublishedBuildInfo
- type Tracker
- type Vcs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEqualDependencySlices ¶
func IsEqualDependencySlices(actual, other []Dependency) (bool, error)
func IsEqualModuleSlices ¶
Types ¶
type AffectedIssue ¶
type BuildInfo ¶
type BuildInfo struct { Name string `json:"name,omitempty"` Number string `json:"number,omitempty"` Agent *Agent `json:"agent,omitempty"` BuildAgent *Agent `json:"buildAgent,omitempty"` Modules []Module `json:"modules,omitempty"` Started string `json:"started,omitempty"` Properties Env `json:"properties,omitempty"` Principal string `json:"artifactoryPrincipal,omitempty"` BuildUrl string `json:"url,omitempty"` Issues *Issues `json:"issues,omitempty"` PluginVersion string `json:"artifactoryPluginVersion,omitempty"` VcsList []Vcs `json:"vcs,omitempty"` }
func (*BuildInfo) Append ¶
Append the modules of the received build info to this build info. If the two build info instances contain modules with identical names, these modules are merged. When merging the modules, the artifacts and dependencies remain unique according to their checksum.
func (*BuildInfo) ExcludeEnv ¶
ExcludeEnv gets one or more wildcard patterns and filters out environment variables that match at least one of them.
func (*BuildInfo) IncludeEnv ¶
IncludeEnv gets one or more wildcard patterns and filters out environment variables that don't match any of them.
func (*BuildInfo) SetAgentName ¶
func (*BuildInfo) SetAgentVersion ¶
func (*BuildInfo) SetBuildAgentVersion ¶
func (*BuildInfo) SetPluginVersion ¶
type Checksum ¶
type Dependency ¶
type Dependency struct { Id string `json:"id,omitempty"` Type string `json:"type,omitempty"` Scopes []string `json:"scopes,omitempty"` RequestedBy [][]string `json:"requestedBy,omitempty"` Checksum }
func (*Dependency) IsEqual ¶
func (d *Dependency) IsEqual(other Dependency) (bool, error)
If the 'other' Dependency matches the current one, return true. 'other' Dependency may contain regex values for Id and Checksum.
func (*Dependency) NodeHasLoop ¶
func (d *Dependency) NodeHasLoop() bool
func (*Dependency) UpdateRequestedBy ¶
func (d *Dependency) UpdateRequestedBy(parentId string, parentRequestedBy [][]string)
type Issues ¶
type Issues struct { Tracker *Tracker `json:"tracker,omitempty"` AggregateBuildIssues bool `json:"aggregateBuildIssues,omitempty"` AggregationBuildStatus string `json:"aggregationBuildStatus,omitempty"` AffectedIssues []AffectedIssue `json:"affectedIssues,omitempty"` }
type Module ¶
type Module struct { Type ModuleType `json:"type,omitempty"` Properties interface{} `json:"properties,omitempty"` Id string `json:"id,omitempty"` Artifacts []Artifact `json:"artifacts,omitempty"` ExcludedArtifacts []Artifact `json:"excludedArtifacts,omitempty"` Dependencies []Dependency `json:"dependencies,omitempty"` // Used in aggregated builds - this field stores the checksums of the referenced build-info JSON. Checksum }
type ModuleType ¶
type ModuleType string
const ( TimeFormat = "2006-01-02T15:04:05.000-0700" BuildInfoEnvPrefix = "buildInfo.env." RequestedByMaxLength = 15 // Build type Build ModuleType = "build" // Package managers types Generic ModuleType = "generic" Maven ModuleType = "maven" Gradle ModuleType = "gradle" Docker ModuleType = "docker" Npm ModuleType = "npm" Nuget ModuleType = "nuget" Go ModuleType = "go" Python ModuleType = "python" Terraform ModuleType = "terraform" )
type Partial ¶
type Partial struct { ModuleType ModuleType `json:"Type,omitempty"` Artifacts []Artifact `json:"Artifacts,omitempty"` Dependencies []Dependency `json:"Dependencies,omitempty"` Env Env `json:"Env,omitempty"` Timestamp int64 `json:"Timestamp,omitempty"` ModuleId string `json:"ModuleId,omitempty"` Issues *Issues `json:"Issues,omitempty"` VcsList []Vcs `json:"vcs,omitempty"` Checksum }
type PublishedBuildInfo ¶
type PublishedBuildInfo struct { Uri string `json:"uri,omitempty"` BuildInfo BuildInfo `json:"buildInfo,omitempty"` }
PublishedBuildInfo represents the response structure returned from Artifactory when getting a build-info.