config

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

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

func ClientTLSConfig() (*tls.Config, error)

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

Jump to

Keyboard shortcuts

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