util

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 84

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, defaultValue 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, credentialTag 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, req *resty.Request, productId string, featureUsages ...string)

func SendUsageResourceCreate added in v1.21.0

func SendUsageResourceCreate(ctx context.Context, req *resty.Request, productId, resourceName string)

func SendUsageResourceDelete added in v1.21.0

func SendUsageResourceDelete(ctx context.Context, req *resty.Request, productId, resourceName string)

func SendUsageResourceRead added in v1.21.0

func SendUsageResourceRead(ctx context.Context, req *resty.Request, productId, resourceName string)

func SendUsageResourceUpdate added in v1.21.0

func SendUsageResourceUpdate(ctx context.Context, req *resty.Request, productId, resourceName string)

Types

type Feature added in v1.25.1

type Feature struct {
	FeatureId string `json:"featureId"`
}

type Identifiable added in v1.1.0

type Identifiable interface {
	Id() string
}

type JFrogError added in v1.27.0

type JFrogError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type JFrogErrors added in v1.27.0

type JFrogErrors struct {
	Errors []JFrogError `json:"errors"`
}

func (JFrogErrors) String added in v1.27.0

func (e JFrogErrors) String() string

type JFrogResource added in v1.27.0

type JFrogResource struct {
	ProviderData            *ProviderMetadata
	TypeName                string
	ValidArtifactoryVersion string
	DocumentEndpoint        string
	CollectionEndpoint      string
}

func (*JFrogResource) Configure added in v1.27.0

func (*JFrogResource) Metadata added in v1.27.0

func (JFrogResource) ValidateConfig added in v1.27.0

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
}

type UsageStruct added in v1.25.1

type UsageStruct struct {
	ProductId string    `json:"productId"`
	Features  []Feature `json:"features"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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