config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORS

type CORS struct {
	AllowedOrigins   []string `` /* 366-byte string literal not displayed */
	AllowedMethods   []string `` /* 370-byte string literal not displayed */
	AllowedHeaders   []string `` /* 372-byte string literal not displayed */
	AllowCredentials bool     `` /* 318-byte string literal not displayed */
}

CORS defines the available cors configuration.

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

	GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"`
	GrpcClient    client.Client         `yaml:"-"`

	HTTP HTTP `yaml:"http"`

	DisablePreviews      bool            `` /* 284-byte string literal not displayed */
	OpenCloudPublicURL   string          `` /* 134-byte string literal not displayed */
	WebdavNamespace      string          `` /* 144-byte string literal not displayed */
	RevaGateway          string          `yaml:"reva_gateway" env:"OC_REVA_GATEWAY" desc:"CS3 gateway used to look up user metadata" introductionVersion:"1.0.0"`
	RevaGatewayTLSMode   string          `` /* 472-byte string literal not displayed */
	RevaGatewayTLSCACert string          `` /* 170-byte string literal not displayed */
	Context              context.Context `yaml:"-"`
}

Config combines all available configuration parts.

type Debug

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

Debug defines the available debug configuration.

type HTTP

type HTTP struct {
	Addr      string                `yaml:"addr" env:"WEBDAV_HTTP_ADDR" desc:"The bind address of the HTTP service." introductionVersion:"1.0.0"`
	Namespace string                `yaml:"-"`
	Root      string                `` /* 129-byte string literal not displayed */
	CORS      CORS                  `yaml:"cors"`
	TLS       shared.HTTPServiceTLS `yaml:"tls"`
}

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string `` /* 185-byte string literal not displayed */
	Pretty bool   `mapstructure:"pretty" env:"OC_LOG_PRETTY;WEBDAV_LOG_PRETTY" desc:"Activates pretty log output." introductionVersion:"1.0.0"`
	Color  bool   `mapstructure:"color" env:"OC_LOG_COLOR;WEBDAV_LOG_COLOR" desc:"Activates colorized log output." introductionVersion:"1.0.0"`
	File   string `` /* 153-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 Tracing

type Tracing struct {
	Enabled   bool   `yaml:"enabled" env:"OC_TRACING_ENABLED;WEBDAV_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 209-byte string literal not displayed */
	Endpoint  string `` /* 135-byte string literal not displayed */
	Collector string `` /* 255-byte string literal not displayed */
}

Tracing defines the available tracing configuration.

func (Tracing) Convert

func (t Tracing) Convert() tracing.Config

Convert Tracing to the tracing package's Config struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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