config

package
v1.1.0-alpha.4 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 `` /* 371-byte string literal not displayed */
	AllowedMethods   []string `` /* 375-byte string literal not displayed */
	AllowedHeaders   []string `` /* 377-byte string literal not displayed */
	AllowCredentials bool     `` /* 323-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"`

	Events Events `yaml:"events"`
	Store  Store  `yaml:"store"`

	RevaGateway   string                `yaml:"reva_gateway" env:"OC_REVA_GATEWAY" desc:"CS3 gateway used to look up user metadata" introductionVersion:"1.0.0"`
	GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"`

	HTTP         HTTP          `yaml:"http"`
	TokenManager *TokenManager `yaml:"token_manager"`

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

	ServiceAccount ServiceAccount `yaml:"service_account"`

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

Config combines all available configuration parts.

type Debug

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

Debug defines the available debug configuration.

type Events

type Events struct {
	Endpoint             string `` /* 221-byte string literal not displayed */
	Cluster              string `` /* 264-byte string literal not displayed */
	TLSInsecure          bool   `yaml:"tls_insecure" env:"OC_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"1.0.0"`
	TLSRootCACertificate string `` /* 245-byte string literal not displayed */
	EnableTLS            bool   `` /* 231-byte string literal not displayed */
	AuthUsername         string `` /* 233-byte string literal not displayed */
	AuthPassword         string `` /* 233-byte string literal not displayed */
}

Events combines the configuration options for the event bus.

type HTTP

type HTTP struct {
	Addr      string                `yaml:"addr" env:"ACTIVITYLOG_HTTP_ADDR" desc:"The bind address of the HTTP service." introductionVersion:"1.0.0"`
	Namespace string                `yaml:"-"`
	Root      string                `` /* 134-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 `` /* 190-byte string literal not displayed */
	Pretty bool   `` /* 128-byte string literal not displayed */
	Color  bool   `` /* 128-byte string literal not displayed */
	File   string `` /* 158-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 ServiceAccount

type ServiceAccount struct {
	ServiceAccountID     string `` /* 234-byte string literal not displayed */
	ServiceAccountSecret string `` /* 159-byte string literal not displayed */
}

ServiceAccount is the configuration for the used service account

type Store

type Store struct {
	Store        string        `` /* 224-byte string literal not displayed */
	Nodes        []string      `` /* 366-byte string literal not displayed */
	Database     string        `` /* 134-byte string literal not displayed */
	Table        string        `yaml:"table" env:"ACTIVITYLOG_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"1.0.0"`
	TTL          time.Duration `` /* 200-byte string literal not displayed */
	AuthUsername string        `` /* 224-byte string literal not displayed */
	AuthPassword string        `` /* 224-byte string literal not displayed */
}

Store configures the store to use

type TokenManager

type TokenManager struct {
	JWTSecret string `` /* 139-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;ACTIVITYLOG_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 214-byte string literal not displayed */
	Endpoint  string `` /* 140-byte string literal not displayed */
	Collector string `` /* 260-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