Documentation ¶
Overview ¶
Package config implements the standard client configuration file parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientTLSConfig ¶
ClientTLSConfig returns TLS Config for client.
func DefaultServerTLSConfig ¶
func DefaultServerTLSConfig(serverKeyPair *tls.Certificate) *tls.Config
DefaultServerTLSConfig setting https://wiki.mozilla.org/Security/Server_Side_TLS
Types ¶
type CredentialsConfig ¶
type CredentialsConfig struct { BaseURL string `json:"baseUrl,omitempty" yaml:"base_url,omitempty"` ApplicationID string `json:"applicationId,omitempty" yaml:"application_id,omitempty"` AppSpaceID string `json:"appSpaceId,omitempty" yaml:"app_space_id,omitempty"` AppAgentID string `json:"appAgentId,omitempty" yaml:"app_agent_id,omitempty"` ServiceAccountID string `json:"serviceAccountId,omitempty" yaml:"service_account_id,omitempty"` //nolint:lll Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"` PrivateKeyPKCS8Base64 string `json:"privateKeyPKCS8Base64,omitempty" yaml:"private_key_pkcs8_base64,omitempty"` //nolint:lll PrivateKeyPKCS8 string `json:"privateKeyPKCS8,omitempty" yaml:"private_key_pkcs8,omitempty"` //nolint:lll TokenLifetime string `json:"tokenLifetime,omitempty" yaml:"token_lifetime,omitempty"` PrivateKeyJWK json.RawMessage `json:"privateKeyJWK,omitempty" yaml:"private_key_jwk,omitempty"` }
func DefaultEnvironmentLoader ¶
func DefaultEnvironmentLoader(_ context.Context) (*CredentialsConfig, error)
func DefaultEnvironmentLoaderConfig ¶ added in v0.36.0
func DefaultEnvironmentLoaderConfig(_ context.Context) (*CredentialsConfig, error)
func UnmarshalCredentialConfig ¶
func UnmarshalCredentialConfig(credentialJSON []byte) (*CredentialsConfig, error)
type CredentialsLoader ¶
type CredentialsLoader func(ctx context.Context) (*CredentialsConfig, error)
func StaticCredentialConfig ¶
func StaticCredentialConfig(config *CredentialsConfig) CredentialsLoader
func StaticCredentialsJSON ¶
func StaticCredentialsJSON(credentialsJSON []byte) CredentialsLoader
Click to show internal directories.
Click to hide internal directories.