config

package
v2.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppHandler

type AppHandler struct {
	Prefix   string `yaml:"-"`
	Insecure bool   `yaml:"insecure" env:"OCIS_INSECURE;FRONTEND_APP_HANDLER_INSECURE" desc:"Allow insecure connections to the frontend."`
}

type Archiver

type Archiver struct {
	MaxNumFiles int64  `yaml:"max_num_files" env:"FRONTEND_ARCHIVER_MAX_NUM_FILES" desc:"Max number of files that can be packed into an archive."`
	MaxSize     int64  `yaml:"max_size" env:"FRONTEND_ARCHIVER_MAX_SIZE" desc:"Max size in bytes of the zip archive the archiver can create."`
	Prefix      string `yaml:"-"`
	Insecure    bool   `yaml:"insecure" env:"OCIS_INSECURE;FRONTEND_ARCHIVER_INSECURE" desc:"Allow insecure connections to the archiver."`
}

type Auth

type Auth struct {
	CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agent"`
}

Auth configures reva http auth middleware.

type CBOXDriver

type CBOXDriver struct {
	DBUsername string `yaml:"db_username,omitempty"`
	DBPassword string `yaml:"db_password,omitempty"`
	DBHost     string `yaml:"db_host,omitempty"`
	DBPort     int    `yaml:"db_port,omitempty"`
	DBName     string `yaml:"db_name,omitempty"`
	Namespace  string `yaml:"namespace,omitempty"`
}

type CORS

type CORS struct {
	AllowedOrigins   []string `` /* 292-byte string literal not displayed */
	AllowedMethods   []string `` /* 296-byte string literal not displayed */
	AllowedHeaders   []string `` /* 299-byte string literal not displayed */
	AllowCredentials bool     `` /* 294-byte string literal not displayed */
}

CORS defines the available cors configuration.

type CacheWarmupDrivers

type CacheWarmupDrivers struct {
	CBOX CBOXDriver `yaml:"cbox,omitempty"`
}

type Checksums

type Checksums struct {
	SupportedTypes      []string `` /* 290-byte string literal not displayed */
	PreferredUploadType string   `` /* 278-byte string literal not displayed */
}

type Config

type Config struct {
	Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service
	Service Service         `yaml:"-"`
	Tracing *Tracing        `yaml:"tracing"`
	Log     *Log            `yaml:"log"`
	Debug   Debug           `yaml:"debug"`

	HTTP HTTPConfig `yaml:"http"`

	TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET" desc:"Transfer secret for signing file up- and download requests."`

	TokenManager      *TokenManager `yaml:"token_manager"`
	Reva              *shared.Reva  `yaml:"reva"`
	MachineAuthAPIKey string        `` /* 207-byte string literal not displayed */

	SkipUserGroupsInToken bool `` /* 157-byte string literal not displayed */

	EnableFavorites                bool   `yaml:"enable_favorites" env:"FRONTEND_ENABLE_FAVORITES" desc:"Enables the support for favorites in the clients."`
	EnableProjectSpaces            bool   `` /* 186-byte string literal not displayed */
	EnableShareJail                bool   `` /* 167-byte string literal not displayed */
	UploadMaxChunkSize             int    `` /* 135-byte string literal not displayed */
	UploadHTTPMethodOverride       string `` /* 139-byte string literal not displayed */
	DefaultUploadProtocol          string `` /* 138-byte string literal not displayed */
	EnableResharing                bool   `` /* 150-byte string literal not displayed */
	EnableFederatedSharingIncoming bool   `` /* 232-byte string literal not displayed */
	EnableFederatedSharingOutgoing bool   `` /* 232-byte string literal not displayed */
	SearchMinLength                int    `` /* 258-byte string literal not displayed */

	PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL" desc:"The public facing URL of the oCIS frontend."`

	AppHandler  AppHandler  `yaml:"app_handler"`
	Archiver    Archiver    `yaml:"archiver"`
	DataGateway DataGateway `yaml:"data_gateway"`
	OCS         OCS         `yaml:"ocs"`
	Checksums   Checksums   `yaml:"checksums"`

	Middleware Middleware `yaml:"middleware"`

	Supervised bool            `yaml:"-"`
	Context    context.Context `yaml:"-"`
}

type DataGateway

type DataGateway struct {
	Prefix string `yaml:"prefix" env:"FRONTEND_DATA_GATEWAY_PREFIX" desc:"Path prefix for the data gateway."`
}

type Debug

type Debug struct {
	Addr   string `` /* 145-byte string literal not displayed */
	Token  string `yaml:"token" env:"FRONTEND_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint."`
	Pprof  bool   `yaml:"pprof" env:"FRONTEND_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling."`
	Zpages bool   `` /* 127-byte string literal not displayed */
}

type HTTPConfig

type HTTPConfig struct {
	Addr      string `yaml:"addr" env:"FRONTEND_HTTP_ADDR" desc:"The bind address of the HTTP service."`
	Namespace string `yaml:"-"`
	Protocol  string `yaml:"protocol" env:"FRONTEND_HTTP_PROTOCOL" desc:"The transport protocol of the HTTP service."`
	Prefix    string `yaml:"prefix" env:"FRONTEND_HTTP_PREFIX" desc:"The Path prefix where the frontend can be accessed (defaults to /)."`
	CORS      CORS   `yaml:"cors"`
}

type Log

type Log struct {
	Level  string `` /* 167-byte string literal not displayed */
	Pretty bool   `yaml:"pretty" env:"OCIS_LOG_PRETTY;FRONTEND_LOG_PRETTY" desc:"Activates pretty log output."`
	Color  bool   `yaml:"color" env:"OCIS_LOG_COLOR;FRONTEND_LOG_COLOR" desc:"Activates colorized log output."`
	File   string `yaml:"file" env:"OCIS_LOG_FILE;FRONTEND_LOG_FILE" desc:"The path to the log file. Activates logging to this file if set."`
}

type Middleware

type Middleware struct {
	Auth Auth `yaml:"auth"`
}

Middleware configures reva middlewares.

type OCS

type OCS struct {
	Prefix                  string             `yaml:"prefix" env:"FRONTEND_OCS_PREFIX" desc:"Path prefix for the OCS service"`
	SharePrefix             string             `yaml:"share_prefix" env:"FRONTEND_OCS_SHARE_PREFIX" desc:"Path prefix for shares."`
	HomeNamespace           string             `yaml:"home_namespace" env:"FRONTEND_OCS_HOME_NAMESPACE" desc:"Homespace namespace identifier."`
	AdditionalInfoAttribute string             ``                                      /* 146-byte string literal not displayed */
	ResourceInfoCacheTTL    int                ``                                      /* 150-byte string literal not displayed */
	ResourceInfoCacheType   string             ``                                      /* 151-byte string literal not displayed */
	ResourceInfoCaches      ResourceInfoCaches `yaml:"resource_info_caches,omitempty"` // only used for redis
	CacheWarmupDriver       string             `yaml:"cache_warmup_driver,omitempty"`  // not supported by the oCIS product, therefore not part of docs
	CacheWarmupDrivers      CacheWarmupDrivers `yaml:"cache_warmup_drivers,omitempty"` // not supported by the oCIS product, therefore not part of docs
	EnableDenials           bool               `yaml:"enable_denials" env:"FRONTEND_OCS_ENABLE_DENIALS" desc:"EXPERIMENTAL: enable the feature to deny access on folders."`
}

type RedisDriver

type RedisDriver struct {
	Address  string `yaml:"address" env:"FRONTEND_OCS_RESOURCE_INFO_CACHE_REDIS_ADDR" desc:"Redis service address"`
	Username string `yaml:"username" env:"FRONTEND_OCS_RESOURCE_INFO_CACHE_REDIS_USERNAME" desc:"Redis username"`
	Password string `yaml:"password" env:"FRONTEND_OCS_RESOURCE_INFO_CACHE_REDIS_PASSWORD" desc:"Redis password"`
}

RedisDriver holds redis configuration

type ResourceInfoCaches

type ResourceInfoCaches struct {
	Redis RedisDriver `yaml:"redis,omitempty"`
}

ResourceInfoCaches holds resource info cache configurations

type Service

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

type TokenManager

type TokenManager struct {
	JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;FRONTEND_JWT_SECRET" desc:"The secret to mint and validate jwt tokens."`
}

TokenManager is the config for using the reva token manager

type Tracing

type Tracing struct {
	Enabled   bool   `yaml:"enabled" env:"OCIS_TRACING_ENABLED;FRONTEND_TRACING_ENABLED" desc:"Activates tracing."`
	Type      string `` /* 193-byte string literal not displayed */
	Endpoint  string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;FRONTEND_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."`
	Collector string `` /* 231-byte string literal not displayed */
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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