config

package
v1.11.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 21

Documentation

Index

Constants

View Source
const (
	// SUPERVISED sets the runtime mode as supervised threads.
	SUPERVISED = iota

	// UNSUPERVISED sets the runtime mode as a single thread.
	UNSUPERVISED
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Mode is mostly used whenever we need to run an extension. The technical debt this introduces is in regards of
	// what it does. Supervised (0) loads configuration from a unified config file because of known limitations of Viper; whereas
	// Unsupervised (1) MUST parse config from all known sources.
	Mode Mode
	File string

	Registry     string
	Log          Log
	Debug        Debug
	HTTP         HTTP
	GRPC         GRPC
	Tracing      Tracing
	TokenManager TokenManager
	Runtime      Runtime

	Accounts      *accounts.Config
	GLAuth        *glauth.Config
	Graph         *graph.Config
	GraphExplorer *graphExplorer.Config
	IDP           *idp.Config
	OCS           *ocs.Config
	Onlyoffice    *onlyoffice.Config
	Web           *web.Config
	Proxy         *proxy.Config
	Settings      *settings.Config
	Storage       *storage.Config
	Store         *store.Config
	Thumbnails    *thumbnails.Config
	WebDAV        *webdav.Config
}

Config combines all available configuration parts.

func New

func New() *Config

New initializes a new configuration with or without defaults.

type Debug

type Debug struct {
	Addr   string
	Token  string
	Pprof  bool
	Zpages bool
}

Debug defines the available debug configuration.

type GRPC

type GRPC struct {
	Addr string
}

GRPC defines the available grpc configuration.

type HTTP

type HTTP struct {
	Addr string
	Root string
}

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string
	Pretty bool
	Color  bool
	File   string
}

Log defines the available logging configuration.

type Mode

type Mode int

type Runtime

type Runtime struct {
	Port       string
	Host       string
	Extensions string
}

Runtime configures the oCIS runtime when running in supervised mode.

type TokenManager

type TokenManager struct {
	JWTSecret string
}

TokenManager is the config for using the reva token manager

type Tracing

type Tracing struct {
	Enabled   bool
	Type      string
	Endpoint  string
	Collector string
	Service   string
}

Tracing defines the available tracing configuration.

Jump to

Keyboard shortcuts

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