config

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Path string `ocisConfig:"path" env:"SETTINGS_ASSET_PATH"`
}

Asset defines the available asset configuration.

type CORS added in v1.14.0

type CORS struct {
	AllowedOrigins   []string `ocisConfig:"allowed_origins"`
	AllowedMethods   []string `ocisConfig:"allowed_methods"`
	AllowedHeaders   []string `ocisConfig:"allowed_headers"`
	AllowCredentials bool     `ocisConfig:"allowed_credentials"`
}

CORS defines the available cors configuration.

type Config

type Config struct {
	*shared.Commons `ocisConfig:"-" yaml:"-"`

	Service Service `ocisConfig:"-" yaml:"-"`

	Tracing *Tracing `ocisConfig:"tracing"`
	Log     *Log     `ocisConfig:"log"`
	Debug   Debug    `ocisConfig:"debug"`

	HTTP HTTP `ocisConfig:"http"`
	GRPC GRPC `ocisConfig:"grpc"`

	StoreType string   `ocisConfig:"store_type" env:"SETTINGS_STORE_TYPE"`
	DataPath  string   `ocisConfig:"data_path" env:"SETTINGS_DATA_PATH"`
	Metadata  Metadata `ocisConfig:"metadata_config"`

	Asset        Asset        `ocisConfig:"asset"`
	TokenManager TokenManager `ocisConfig:"token_manager"`

	Context context.Context `ocisConfig:"-" yaml:"-"`
}

Config combines all available configuration parts.

type Debug

type Debug struct {
	Addr   string `ocisConfig:"addr" env:"SETTINGS_DEBUG_ADDR"`
	Token  string `ocisConfig:"token" env:"SETTINGS_DEBUG_TOKEN"`
	Pprof  bool   `ocisConfig:"pprof" env:"SETTINGS_DEBUG_PPROF"`
	Zpages bool   `ocisConfig:"zpages" env:"SETTINGS_DEBUG_ZPAGES"`
}

Debug defines the available debug configuration.

type GRPC

type GRPC struct {
	Addr      string `ocisConfig:"addr" env:"SETTINGS_GRPC_ADDR"`
	Namespace string `ocisConfig:"-" yaml:"-"`
}

GRPC defines the available grpc configuration.

type HTTP

type HTTP struct {
	Addr      string `ocisConfig:"addr" env:"SETTINGS_HTTP_ADDR"`
	Namespace string `ocisConfig:"-" yaml:"-"`
	Root      string `ocisConfig:"root" env:"SETTINGS_HTTP_ROOT"`
	CacheTTL  int    `ocisConfig:"cache_ttl" env:"SETTINGS_CACHE_TTL"`
	CORS      CORS   `ocisConfig:"cors"`
}

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string `mapstructure:"level" env:"OCIS_LOG_LEVEL;SETTINGS_LOG_LEVEL"`
	Pretty bool   `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;SETTINGS_LOG_PRETTY"`
	Color  bool   `mapstructure:"color" env:"OCIS_LOG_COLOR;SETTINGS_LOG_COLOR"`
	File   string `mapstructure:"file" env:"OCIS_LOG_FILE;SETTINGS_LOG_FILE"`
}

Log defines the available log configuration.

type Metadata added in v1.19.0

type Metadata struct {
	GatewayAddress string `ocisConfig:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR"`
	StorageAddress string `ocisConfig:"storage_addr" env:"STORAGE_GRPC_ADDR"`

	ServiceUserID     string `ocisConfig:"service_user_id" env:"METADATA_SERVICE_USER_UUID"`
	ServiceUserIDP    string `ocisConfig:"service_user_idp" env:"OCIS_URL;METADATA_SERVICE_USER_IDP"`
	MachineAuthAPIKey string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY"`
}

Metadata configures the metadata store to use

type Service

type Service struct {
	Name string `ocisConfig:"-" yaml:"-"`
}

Service defines the available service configuration.

type TokenManager

type TokenManager struct {
	JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;SETTINGS_JWT_SECRET"`
}

TokenManager is the config for using the reva token manager

type Tracing

type Tracing struct {
	Enabled   bool   `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;SETTINGS_TRACING_ENABLED"`
	Type      string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;SETTINGS_TRACING_TYPE"`
	Endpoint  string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;SETTINGS_TRACING_ENDPOINT"`
	Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;SETTINGS_TRACING_COLLECTOR"`
}

Tracing defines the available tracing configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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