config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 6 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORS

type CORS struct {
	AllowedOrigins   []string `` /* 368-byte string literal not displayed */
	AllowedMethods   []string `` /* 372-byte string literal not displayed */
	AllowedHeaders   []string `` /* 374-byte string literal not displayed */
	AllowCredentials bool     `` /* 320-byte string literal not displayed */
}

CORS defines the available cors configuration.

type Cache

type Cache struct {
	Store              string        `` /* 228-byte string literal not displayed */
	Nodes              []string      `` /* 368-byte string literal not displayed */
	Database           string        `yaml:"database" env:"OC_CACHE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"1.0.0"`
	FileTable          string        `` /* 145-byte string literal not displayed */
	DirectoryTable     string        `` /* 161-byte string literal not displayed */
	TTL                time.Duration `` /* 246-byte string literal not displayed */
	DisablePersistence bool          `` /* 242-byte string literal not displayed */
	AuthUsername       string        `` /* 210-byte string literal not displayed */
	AuthPassword       string        `` /* 210-byte string literal not displayed */
}

Cache configures the cache of the Metadata store

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 HTTP       `yaml:"http"`
	GRPC GRPCConfig `yaml:"grpc"`

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

	Metadata    Metadata              `yaml:"metadata_config"`
	BundlesPath string                `` /* 182-byte string literal not displayed */
	Bundles     []*settingsmsg.Bundle `yaml:"-"`

	AdminUserID string `` /* 289-byte string literal not displayed */

	TokenManager *TokenManager `yaml:"token_manager"`

	SetupDefaultAssignments bool `` /* 189-byte string literal not displayed */

	ServiceAccountIDs []string `` /* 427-byte string literal not displayed */

	DefaultLanguage string `` /* 226-byte string literal not displayed */
	TranslationPath string `` /* 290-byte string literal not displayed */

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

Config combines all available configuration parts.

type Debug

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

Debug defines the available debug configuration.

type GRPCConfig

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

GRPCConfig defines the available grpc configuration.

type HTTP

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

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string `` /* 187-byte string literal not displayed */
	Pretty bool   `mapstructure:"pretty" env:"OC_LOG_PRETTY;SETTINGS_LOG_PRETTY" desc:"Activates pretty log output." introductionVersion:"1.0.0"`
	Color  bool   `mapstructure:"color" env:"OC_LOG_COLOR;SETTINGS_LOG_COLOR" desc:"Activates colorized log output." introductionVersion:"1.0.0"`
	File   string `` /* 155-byte string literal not displayed */
}

Log defines the available log configuration.

type Metadata

type Metadata struct {
	GatewayAddress string `` /* 165-byte string literal not displayed */
	StorageAddress string `` /* 149-byte string literal not displayed */

	SystemUserID     string `` /* 360-byte string literal not displayed */
	SystemUserIDP    string `` /* 156-byte string literal not displayed */
	SystemUserAPIKey string `` /* 134-byte string literal not displayed */
	Cache            *Cache `yaml:"cache"`
}

Metadata configures the metadata store to use

type Service

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

Service defines the available service configuration.

type TokenManager

type TokenManager struct {
	JWTSecret string `` /* 136-byte string literal not displayed */
}

TokenManager is the config for using the reva token manager

type Tracing

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