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: 4 Imported by: 6

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:"ACCOUNTS_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 CS3

type CS3 struct {
	ProviderAddr string `ocisConfig:"provider_addr" env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"`
}

CS3 is the cs3 implementation of the storage.

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"`
	GRPC GRPC `ocisConfig:"grpc"`

	TokenManager TokenManager `ocisConfig:"token_manager"`

	Asset              Asset       `ocisConfig:"asset"`
	Repo               Repo        `ocisConfig:"repo"`
	Index              Index       `ocisConfig:"index"`
	ServiceUser        ServiceUser `ocisConfig:"service_user"`
	HashDifficulty     int         `ocisConfig:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY"`
	DemoUsersAndGroups bool        `ocisConfig:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS"`

	Context context.Context
}

Config combines all available configuration parts.

func DefaultConfig added in v1.16.0

func DefaultConfig() *Config

type Debug added in v1.17.0

type Debug struct {
	Addr   string `ocisConfig:"addr" env:"ACCOUNTS_DEBUG_ADDR"`
	Token  string `ocisConfig:"token" env:"ACCOUNTS_DEBUG_TOKEN"`
	Pprof  bool   `ocisConfig:"pprof" env:"ACCOUNTS_DEBUG_PPROF"`
	Zpages bool   `ocisConfig:"zpages" env:"ACCOUNTS_DEBUG_ZPAGES"`
}

Debug defines the available debug configuration.

type Disk

type Disk struct {
	Path string `ocisConfig:"path" env:"ACCOUNTS_STORAGE_DISK_PATH"`
}

Disk is the local disk implementation of the storage.

type GIDBound added in v1.17.0

type GIDBound struct {
	Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_GID_INDEX_LOWER_BOUND"`
	Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_GID_INDEX_UPPER_BOUND"`
}

GIDBound defines a lower and upper bound.

type GRPC

type GRPC struct {
	Addr      string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR"`
	Namespace string
}

GRPC defines the available grpc configuration.

type HTTP

type HTTP struct {
	Addr      string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR"`
	Namespace string
	Root      string `ocisConfig:"root" env:"ACCOUNTS_HTTP_ROOT"`
	CacheTTL  int    `ocisConfig:"cache_ttl" env:"ACCOUNTS_CACHE_TTL"`
	CORS      CORS   `ocisConfig:"cors"`
}

HTTP defines the available http configuration.

type Index

type Index struct {
	UID UIDBound `ocisConfig:"uid"`
	GID GIDBound `ocisConfig:"gid"`
}

Index defines config for indexes.

type Log

type Log struct {
	Level  string `mapstructure:"level" env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL"`
	Pretty bool   `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY"`
	Color  bool   `mapstructure:"color" env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR"`
	File   string `mapstructure:"file" env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE"`
}

Log defines the available log configuration.

type Repo

type Repo struct {
	Backend string `ocisConfig:"backend"  env:"ACCOUNTS_STORAGE_BACKEND"`
	Disk    Disk   `ocisConfig:"disk"`
	CS3     CS3    `ocisConfig:"cs3"`
}

Repo defines which storage implementation is to be used.

type Service added in v1.17.0

type Service struct {
	Name string
}

Service defines the available service configuration.

type ServiceUser

type ServiceUser struct {
	UUID     string `ocisConfig:"uuid" env:"ACCOUNTS_SERVICE_USER_UUID"`
	Username string `ocisConfig:"username" env:"ACCOUNTS_SERVICE_USER_USERNAME"`
	UID      int64  `ocisConfig:"uid" env:"ACCOUNTS_SERVICE_USER_UID"`
	GID      int64  `ocisConfig:"gid" env:"ACCOUNTS_SERVICE_USER_GID"`
}

ServiceUser defines the user required for EOS.

type TokenManager

type TokenManager struct {
	JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;ACCOUNTS_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;ACCOUNTS_TRACING_ENABLED"`
	Type      string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"`
	Endpoint  string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT"`
	Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"`
}

Tracing defines the available tracing configuration.

type UIDBound added in v1.17.0

type UIDBound struct {
	Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_UID_INDEX_LOWER_BOUND"`
	Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_UID_INDEX_UPPER_BOUND"`
}

UIDBound defines a lower and upper bound.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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