Documentation
¶
Index ¶
- Constants
- func BuildApplicationVersionRepoKey(project string) string
- func BuildBuildInfoRepoKey(project string) string
- func BuildQuery(template, nodeFields string) string
- func BuildReleaseBundleRepoKey(project string) string
- func GetEnvVariable(envVarName string) (string, error)
- func IsAttachmentsFieldNotFound(err error) bool
- func IsFlagPositiveNumber(flag string) bool
- func IsHttpStatusSuccessful(statusCode int) bool
- func IsRunningUnderGitHubAction() bool
- func IsSonarIntegration(integration string) bool
- func ParseIsoTimestamp(isoTimestamp string) (time.Time, error)
- func ValidateIntegration(integration string) error
- type AqlResult
- type NodeFieldsBuilder
Constants ¶
View Source
const ( NodeFieldsPlaceholder = "{{NODE_FIELDS}}" // Shared GraphQL node field fragments. FieldDownloadPath = "downloadPath" FieldPredicateType = "predicateType" FieldPredicateSlug = "predicateSlug" FieldPredicate = "predicate" FieldVerified = "verified" FieldCreatedBy = "createdBy" FieldCreatedAt = "createdAt" FieldSubjectSha256 = "subject { sha256 }" FieldSigningKeyAlias = "signingKey { alias }" FieldSigningKeyWithPublicKey = "signingKey {alias, publicKey}" // Optional GraphQL fragments. AttachmentsFragment = "attachments { name sha256 type downloadPath }" )
View Source
const DefaultProject = "default"
View Source
const IsoDateTimeLayout = "2006-01-02T15:04:05.000-0700"
View Source
const SonarIntegration = "sonar"
Variables ¶
This section is empty.
Functions ¶
func BuildApplicationVersionRepoKey ¶ added in v0.8.1
func BuildBuildInfoRepoKey ¶
func BuildQuery ¶ added in v0.9.0
BuildQuery replaces every occurrence of NodeFieldsPlaceholder in template with the provided nodeFields string.
func GetEnvVariable ¶
func IsAttachmentsFieldNotFound ¶ added in v0.9.0
func IsFlagPositiveNumber ¶
func IsHttpStatusSuccessful ¶ added in v0.9.0
func IsRunningUnderGitHubAction ¶
func IsRunningUnderGitHubAction() bool
func IsSonarIntegration ¶
func ValidateIntegration ¶
Types ¶
type AqlResult ¶
type AqlResult struct {
Results []*servicesUtils.ResultItem `json:"results,omitempty"`
}
func ExecuteAqlQuery ¶
func ExecuteAqlQuery(query string, client *artifactory.ArtifactoryServicesManager) (*AqlResult, error)
ExecuteAqlQuery executes an AQL query and returns the result.
type NodeFieldsBuilder ¶ added in v0.9.0
type NodeFieldsBuilder struct {
// contains filtered or unexported fields
}
NodeFieldsBuilder composes GraphQL node field lists dynamically, avoiding combinatorial explosion of query constants when optional fields (attachments, predicate, publicKey, etc.) are involved.
func NewNodeFieldsBuilder ¶ added in v0.9.0
func NewNodeFieldsBuilder(baseFields ...string) *NodeFieldsBuilder
NewNodeFieldsBuilder creates a builder pre-populated with the given base fields.
func (*NodeFieldsBuilder) Build ¶ added in v0.9.0
func (b *NodeFieldsBuilder) Build() string
Build returns the space-joined field list ready for insertion into a query template.
func (*NodeFieldsBuilder) WithIf ¶ added in v0.9.0
func (b *NodeFieldsBuilder) WithIf(condition bool, field string) *NodeFieldsBuilder
WithIf appends field to the list only when condition is true.
Click to show internal directories.
Click to hide internal directories.