config

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 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() (clientTLSConf *tls.Config, err error)

ClientTLSConfig returns TLS Config for client.

func DefaultServerTLSConfig

func DefaultServerTLSConfig(serverKeyPair *tls.Certificate) (serverConfig *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"`
	DefaultTenantID string `json:"defaultTenantId,omitempty" yaml:"default_tenant_id,omitempty"`

	AppAgentID            string          `json:"appAgentId,omitempty" yaml:"app_agent_id,omitempty"`
	ServiceAccountID      string          `json:"serviceAccountId,omitempty" yaml:"service_account_id,omitempty"`
	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"`
	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