config

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 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 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

	Service Service

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

	HTTP HTTP `ocisConfig:"http"`

	TokenManager TokenManager `ocisConfig:"token_manager"`
	Reva         Reva         `ocisConfig:"reva"`

	IdentityManagement IdentityManagement `ocisConfig:"identity_management"`

	AccountBackend     string `ocisConfig:"account_backend" env:"OCS_ACCOUNT_BACKEND_TYPE"`
	StorageUsersDriver string `ocisConfig:"storage_users_driver" env:"STORAGE_USERS_DRIVER;OCS_STORAGE_USERS_DRIVER"`
	MachineAuthAPIKey  string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY"`

	Context context.Context
}

Config combines all available configuration parts.

func DefaultConfig added in v1.16.0

func DefaultConfig() *Config

type Debug

type Debug struct {
	Addr   string `ocisConfig:"addr" env:"OCS_DEBUG_ADDR"`
	Token  string `ocisConfig:"token" env:"OCS_DEBUG_TOKEN"`
	Pprof  bool   `ocisConfig:"pprof" env:"OCS_DEBUG_PPROF"`
	Zpages bool   `ocisConfig:"zpages" env:"OCS_DEBUG_ZPAGES"`
}

Debug defines the available debug configuration.

type HTTP

type HTTP struct {
	Addr      string `ocisConfig:"addr" env:"OCS_HTTP_ADDR"`
	Root      string `ocisConfig:"root" env:"OCS_HTTP_ROOT"`
	Namespace string
	CORS      CORS `ocisConfig:"cors"`
}

HTTP defines the available http configuration.

type IdentityManagement

type IdentityManagement struct {
	Address string `ocisConfig:"address" env:"OCIS_URL;OCS_IDM_ADDRESS"`
}

IdentityManagement keeps track of the OIDC address. This is because Reva requisite of uniqueness for users is based in the combination of IDP hostname + UserID. For more information see: https://github.com/cs3org/reva/blob/4fd0229f13fae5bc9684556a82dbbd0eced65ef9/pkg/storage/utils/decomposedfs/node/node.go#L856-L865

type Log

type Log struct {
	Level  string `mapstructure:"level" env:"OCIS_LOG_LEVEL;OCS_LOG_LEVEL"`
	Pretty bool   `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;OCS_LOG_PRETTY"`
	Color  bool   `mapstructure:"color" env:"OCIS_LOG_COLOR;OCS_LOG_COLOR"`
	File   string `mapstructure:"file" env:"OCIS_LOG_FILE;OCS_LOG_FILE"`
}

Log defines the available log configuration.

type Reva added in v1.15.0

type Reva struct {
	Address string `ocisConfig:"address" env:"REVA_GATEWAY"`
}

Reva defines all available REVA configuration.

type Service

type Service struct {
	Name string
}

Service defines the available service configuration.

type TokenManager

type TokenManager struct {
	JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;OCS_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;OCS_TRACING_ENABLED"`
	Type      string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;OCS_TRACING_TYPE"`
	Endpoint  string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;OCS_TRACING_ENDPOINT"`
	Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;OCS_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