config

package
v1.1.0-alpha.3 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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config contains the configuration for the opencloud-thumbnails service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORS

type CORS struct {
	AllowedOrigins   []string `` /* 370-byte string literal not displayed */
	AllowedMethods   []string `` /* 374-byte string literal not displayed */
	AllowedHeaders   []string `` /* 376-byte string literal not displayed */
	AllowCredentials bool     `` /* 322-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"`

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

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

	Thumbnail Thumbnail `yaml:"thumbnail"`

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

Config combines all available configuration parts.

type Debug

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

Debug defines the available debug configuration.

type FileSystemStorage

type FileSystemStorage struct {
	RootDirectory string `` /* 245-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." introductionVersion:"1.0.0"`
	Namespace             string                 `yaml:"-"`
	TLS                   *shared.GRPCServiceTLS `yaml:"tls"`
	MaxConcurrentRequests int                    `` /* 188-byte string literal not displayed */
}

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." introductionVersion:"1.0.0"`
	TLS       shared.HTTPServiceTLS `yaml:"tls"`
	Root      string                `` /* 133-byte string literal not displayed */
	Namespace string                `yaml:"-"`
	CORS      CORS                  `yaml:"cors"`
}

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string `` /* 189-byte string literal not displayed */
	Pretty bool   `` /* 127-byte string literal not displayed */
	Color  bool   `` /* 127-byte string literal not displayed */
	File   string `` /* 157-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          `` /* 270-byte string literal not displayed */
	FileSystemStorage     FileSystemStorage `yaml:"filesystem_storage"`
	WebdavAllowInsecure   bool              `` /* 186-byte string literal not displayed */
	CS3AllowInsecure      bool              `` /* 177-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"`
	FontMapFile           string            `` /* 133-byte string literal not displayed */
	TransferSecret        string            `` /* 151-byte string literal not displayed */
	DataEndpoint          string            `` /* 155-byte string literal not displayed */
	MaxInputWidth         int               `` /* 152-byte string literal not displayed */
	MaxInputHeight        int               `` /* 155-byte string literal not displayed */
	MaxInputImageFileSize string            `` /* 275-byte string literal not displayed */
}

Thumbnail defines the available thumbnail related configuration.

type Tracing

type Tracing struct {
	Enabled   bool   `yaml:"enabled" env:"OC_TRACING_ENABLED;THUMBNAILS_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 213-byte string literal not displayed */
	Endpoint  string `` /* 139-byte string literal not displayed */
	Collector string `` /* 259-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