util

package
v1.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 81

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckArtifactoryLicense added in v0.5.0

func CheckArtifactoryLicense(client *resty.Client, licenseTypesToCheck ...string) error

func CheckEnvVars added in v1.20.3

func CheckEnvVars(vars []string, dv string) string

func CheckVersion added in v1.12.0

func CheckVersion(versionToCheck string, supportedVersion string) (bool, error)

func ExecuteTemplate added in v1.1.0

func ExecuteTemplate(name, temp string, fields interface{}) string

func GetArtifactoryVersion added in v1.14.0

func GetArtifactoryVersion(client *resty.Client) (string, error)

func GetXrayVersion added in v1.20.3

func GetXrayVersion(client *resty.Client) (string, error)

func OIDCTokenExchange added in v1.23.0

func OIDCTokenExchange(ctx context.Context, client *resty.Client, providerName string) (string, error)

OIDCTokenExchange use TFC_WORKLOAD_IDENTITY_TOKEN env var value to exchange for a access token using OIDC provider configured on JFrog platform

func SendUsage added in v0.4.0

func SendUsage(ctx context.Context, client *resty.Client, productId string, featureUsages ...string)

func SendUsageResourceCreate added in v1.21.0

func SendUsageResourceCreate(ctx context.Context, client *resty.Client, productId, resourceName string)

func SendUsageResourceDelete added in v1.21.0

func SendUsageResourceDelete(ctx context.Context, client *resty.Client, productId, resourceName string)

func SendUsageResourceRead added in v1.21.0

func SendUsageResourceRead(ctx context.Context, client *resty.Client, productId, resourceName string)

func SendUsageResourceUpdate added in v1.21.0

func SendUsageResourceUpdate(ctx context.Context, client *resty.Client, productId, resourceName string)

Types

type OIDCAccessTokenRequest added in v1.23.0

type OIDCAccessTokenRequest struct {
	GrantType        string `json:"grant_type"`
	SubjectTokenType string `json:"subject_token_type"`
	SubjectToken     string `json:"subject_token"`
	ProviderName     string `json:"provider_name"`
}

type OIDCAccessTokenResponse added in v1.23.0

type OIDCAccessTokenResponse struct {
	AccessToken string `json:"access_token"`
}

type ProviderMetadata added in v1.24.0

type ProviderMetadata struct {
	Client             *resty.Client
	ProductId          string
	ArtifactoryVersion string
	XrayVersion        string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL