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 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"`

	GRPC GRPCConfig `yaml:"grpc"`
	HTTP HTTP       `yaml:"http"`

	GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"`

	Thumbnail Thumbnail `yaml:"thumbnail"`

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

Config combines all available configuration parts.

type Debug

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

Debug defines the available debug configuration.

type FileSystemStorage

type FileSystemStorage struct {
	RootDirectory string `` /* 221-byte string literal not displayed */
}

FileSystemStorage defines the available filesystem storage configuration.

type GRPCConfig

type GRPCConfig struct {
	Addr      string                 `yaml:"addr" env:"THUMBNAILS_GRPC_ADDR" desc:"The bind address of the GRPC service."`
	Namespace string                 `yaml:"-"`
	TLS       *shared.GRPCServiceTLS `yaml:"tls"`
}

GRPCConfig defines the available grpc configuration.

type HTTP

type HTTP struct {
	Addr      string                `yaml:"addr" env:"THUMBNAILS_HTTP_ADDR" desc:"The bind address of the HTTP service."`
	TLS       shared.HTTPServiceTLS `yaml:"tls"`
	Root      string                `yaml:"root" env:"THUMBNAILS_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."`
	Namespace string                `yaml:"-"`
}

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string `` /* 177-byte string literal not displayed */
	Pretty bool   `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;THUMBNAILS_LOG_PRETTY" desc:"Activates pretty log output."`
	Color  bool   `mapstructure:"color" env:"OCIS_LOG_COLOR;THUMBNAILS_LOG_COLOR" desc:"Activates colorized log output."`
	File   string `` /* 131-byte string literal not displayed */
}

Log defines the available log configuration.

type Service

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

Service defines the available service configuration.

type Thumbnail

type Thumbnail struct {
	Resolutions         []string          `` /* 221-byte string literal not displayed */
	FileSystemStorage   FileSystemStorage `yaml:"filesystem_storage"`
	WebdavAllowInsecure bool              `` /* 160-byte string literal not displayed */
	CS3AllowInsecure    bool              `` /* 151-byte string literal not displayed */
	RevaGateway         string            `yaml:"reva_gateway" env:"REVA_GATEWAY" desc:"CS3 gateway used to look up user metadata"`
	FontMapFile         string            `yaml:"font_map_file" env:"THUMBNAILS_TXT_FONTMAP_FILE" desc:"The path to a font file for txt thumbnails."`
	TransferSecret      string            `yaml:"transfer_secret" env:"THUMBNAILS_TRANSFER_TOKEN" desc:"The secret to sign JWT to download the actual thumbnail file."`
	DataEndpoint        string            `` /* 127-byte string literal not displayed */
}

Thumbnail defines the available thumbnail related configuration.

type Tracing

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

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