Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireCredentials ¶
AcquireCredentials calls the credentials provider webhook to get the credentials for the given key. If force_refresh is true, the provider will ignore any cached credentials and fetch new ones. The credentials provider URI is read from the HASURA_CREDENTIALS_PROVIDER_URI environment variable. If the HASURA_CREDENTIALS_PROVIDER_BEARER_TOKEN environment variable is set, it will be used as a bearer token for the request.
Types ¶
type CredentialClient ¶
type CredentialClient struct {
// contains filtered or unexported fields
}
CredentialClient is an HTTP client that can requests the credentials provider webhook to get the credentials.
func NewCredentialClient ¶
func NewCredentialClient(httpClient *http.Client) (*CredentialClient, error)
NewCredentialClient creates a CredentialClient instance.
func (*CredentialClient) AcquireCredentials ¶
func (cc *CredentialClient) AcquireCredentials(ctx context.Context, key string, forceRefresh bool) (string, error)
AcquireCredentials calls the credentials provider webhook to get the credentials for the given key.