config

package
v0.0.1-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigTemplate = `` /* 2209-byte string literal not displayed */

Variables

This section is empty.

Functions

func WriteConfigTOML

func WriteConfigTOML(path string, config *Config) error

Types

type AWSS3Config

type AWSS3Config struct {
	Region          string `mapstructure:"region"`
	Bucket          string `mapstructure:"bucket"`
	AccessKeyID     string `mapstructure:"access-key-id"`
	SecretAccessKey string `mapstructure:"secret-access-key"`
}

type AuthenticationConfig

type AuthenticationConfig struct {
	Expiration time.Duration `mapstruct:"expiration"`
	Size       int           `mapstruct:"size"`
}

type BaseConfig

type BaseConfig struct {
	LogLevel              string `mapstructure:"log-level"`
	OracleMnemonic        string `mapstructure:"oracle-mnemonic"`
	DataEncryptionKeyFile string `mapstructure:"data-encryption-key-file"`
}

type Config

type Config struct {
	BaseConfig `mapstructure:",squash"`

	HTTP           HTTPConfig           `mapstructure:"http"`
	Panacea        PanaceaConfig        `mapstructure:"panacea"`
	AWSS3          AWSS3Config          `mapstructure:"aws-s3"`
	Enclave        EnclaveConfig        `mapstructure:"enclave"`
	Authentication AuthenticationConfig `mapsutrcture:"authentication"`
}

func DefaultConfig

func DefaultConfig() *Config

func ReadConfigTOML

func ReadConfigTOML(path string) (*Config, error)

type EnclaveConfig

type EnclaveConfig struct {
	Enable                  bool   `mapstructure:"enable"`
	AttestationProviderAddr string `mapstructure:"attestation-provider-addr"`
}

type HTTPConfig

type HTTPConfig struct {
	ListenAddr string `mapstructure:"laddr"`
	Endpoint   string `mapstructure:"endpoint"`
}

type PanaceaConfig

type PanaceaConfig struct {
	GRPCAddr string `mapstructure:"grpc-addr"`
}

Jump to

Keyboard shortcuts

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