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: 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

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"`
	GrpcClient client.Client `yaml:"-"`

	TokenManager *TokenManager `yaml:"token_manager"`

	Reva                       *shared.Reva          `yaml:"reva"`
	GRPCClientTLS              *shared.GRPCClientTLS `yaml:"grpc_client_tls"`
	Events                     Events                `yaml:"events"`
	Engine                     Engine                `yaml:"engine"`
	Extractor                  Extractor             `yaml:"extractor"`
	ContentExtractionSizeLimit uint64                `` /* 181-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 `` /* 171-byte string literal not displayed */
	Token  string `yaml:"token" env:"SEARCH_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint." introductionVersion:"1.0.0"`
	Pprof  bool   `yaml:"pprof" env:"SEARCH_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 Engine

type Engine struct {
	Type  string      `` /* 159-byte string literal not displayed */
	Bleve EngineBleve `yaml:"bleve"`
}

Engine defines which search engine to use

type EngineBleve

type EngineBleve struct {
	Datapath string `` /* 221-byte string literal not displayed */
}

EngineBleve configures the bleve engine

type Events

type Events struct {
	Endpoint         string `` /* 244-byte string literal not displayed */
	Cluster          string `` /* 286-byte string literal not displayed */
	AsyncUploads     bool   `` /* 140-byte string literal not displayed */
	NumConsumers     int    `` /* 302-byte string literal not displayed */
	DebounceDuration int    `` /* 220-byte string literal not displayed */

	TLSInsecure          bool   `` /* 146-byte string literal not displayed */
	TLSRootCACertificate string `` /* 276-byte string literal not displayed */
	EnableTLS            bool   `` /* 256-byte string literal not displayed */
	AuthUsername         string `` /* 261-byte string literal not displayed */
	AuthPassword         string `` /* 261-byte string literal not displayed */
}

Events combines the configuration options for the event bus.

type Extractor

type Extractor struct {
	Type             string        `` /* 176-byte string literal not displayed */
	CS3AllowInsecure bool          `` /* 183-byte string literal not displayed */
	Tika             ExtractorTika `yaml:"tika"`
}

Extractor defines which extractor to use

type ExtractorTika

type ExtractorTika struct {
	TikaURL        string `yaml:"tika_url" env:"SEARCH_EXTRACTOR_TIKA_TIKA_URL" desc:"URL of the tika server." introductionVersion:"1.0.0"`
	CleanStopWords bool   `` /* 191-byte string literal not displayed */
}

ExtractorTika configures the Tika extractor

type GRPCConfig

type GRPCConfig struct {
	Addr      string                 `yaml:"addr" env:"SEARCH_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 Log

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

type Reva struct {
	Address string `yaml:"address" env:"OC_REVA_GATEWAY" desc:"The CS3 gateway endpoint." introductionVersion:"1.0.0"`
}

Reva defines all available REVA configuration.

type Service

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

Service defines the available service configuration.

type ServiceAccount

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

ServiceAccount is the configuration for the used service account

type TokenManager

type TokenManager struct {
	JWTSecret string `` /* 134-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;SEARCH_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