Documentation ¶
Index ¶
Constants ¶
const ( // Endpoint to the google metadata server, which provides access tokens. // See: https://cloud.google.com/compute/docs/access/authenticate-workloads GoogleMetadataServerTokenEndpoint = "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token" )
Variables ¶
var (
ErrUnexpectedHost = errors.New("Unexpected host")
)
var (
ErrUnexpectedResponse = errors.New("Unexpected response")
)
Functions ¶
This section is empty.
Types ¶
type AWSProvider ¶ added in v0.17.0
AWSProvider is the dedicated provider for accessing AWS services.
func (*AWSProvider) FetchCredentials ¶ added in v0.17.0
func (provider *AWSProvider) FetchCredentials(ctx context.Context) (*Credentials, error)
type AzureProvider ¶ added in v0.19.0
AzureProvider is the dedicated provider for accessing Azure cloud services.
func (*AzureProvider) FetchCredentials ¶ added in v0.19.0
func (provider *AzureProvider) FetchCredentials(ctx context.Context) (*Credentials, error)
type Credentials ¶
Temporary workload credentials used for cloud provider authentication and accessing cloud provider services.
type GCPProvider ¶ added in v0.17.0
GCPProvider is the dedicated provider for accessing Google Cloud services.
func (*GCPProvider) FetchCredentials ¶ added in v0.17.0
func (provider *GCPProvider) FetchCredentials(ctx context.Context) (*Credentials, error)
type GoogleToken ¶
type GoogleToken struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` TokenType string `json:"token_type"` }
Access token for accessing google services like artifact registry.
type Provider ¶ added in v0.17.0
type Provider interface { // FetchCredentials uses the configured provider identity and access management approach to receive temporary credentials for accessing cloud provider services, like container registries. FetchCredentials(context.Context) (*Credentials, error) }
A Provider is a widely recognized cloud computing platform that provides several services for managing access and hosting containers.
func GetProvider ¶ added in v0.17.0
func GetProvider(providerID ProviderID, host string, httpClient *http.Client) Provider
GetProvider constructs a cloud Provider based on the given identifier or nil if no provider for given identifier could be constructed. Currently supported: gcp, aws, azure
type ProviderID ¶ added in v0.17.0
type ProviderID string
const ( AWS ProviderID = "aws" GCP ProviderID = "gcp" Azure ProviderID = "azure" )