util

package
v1.30.5 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: Apache-2.0 Imports: 21 Imported by: 86

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 CheckCatalogHealth added in v1.30.3

func CheckCatalogHealth(client *resty.Client) 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 CheckXrayVersion added in v1.30.5

func CheckXrayVersion(client *resty.Client, minVersion string, customMessage string) (string, error)

func ExecuteTemplate added in v1.1.0

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

func GetAccessVersion added in v1.30.1

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

func GetArtifactoryVersion added in v1.14.0

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

func GetBoolEnvVar added in v1.30.5

func GetBoolEnvVar(vars []string, defaultValue bool) bool

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 JFrogProvider added in v1.28.0

type JFrogProvider struct {
	TypeName  string
	Meta      ProviderMetadata
	ProductID string
	Version   string
}

func (*JFrogProvider) Configure added in v1.28.0

func (*JFrogProvider) Metadata added in v1.28.0

func (*JFrogProvider) Schema added in v1.28.0

type JFrogProviderModel added in v1.28.0

type JFrogProviderModel struct {
	Url                  types.String `tfsdk:"url"`
	AccessToken          types.String `tfsdk:"access_token"`
	OIDCProviderName     types.String `tfsdk:"oidc_provider_name"`
	TFCCredentialTagName types.String `tfsdk:"tfc_credential_tag_name"`
}

type JFrogResource added in v1.27.0

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

func (*JFrogResource) Configure added in v1.27.0

func (*JFrogResource) Metadata added in v1.27.0

func (JFrogResource) ValidateCatalogHealth added in v1.30.3

func (r JFrogResource) ValidateCatalogHealth(providerData *ProviderMetadata) error

ValidateCatalogHealth performs catalog health check when provider data becomes available

func (JFrogResource) ValidateConfig added in v1.27.0

func (JFrogResource) ValidateXrayConfig added in v1.30.2

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
	AccessVersion      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