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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agent"`
}

Auth configures reva http auth middleware.

type CORS

type CORS struct {
	AllowedOrigins   []string `` /* 363-byte string literal not displayed */
	AllowedMethods   []string `` /* 367-byte string literal not displayed */
	AllowedHeaders   []string `` /* 369-byte string literal not displayed */
	AllowCredentials bool     `` /* 315-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"`

	HTTP           HTTPConfig            `yaml:"http"`
	Middleware     Middleware            `yaml:"middleware"`
	GRPC           GRPCConfig            `yaml:"grpc"`
	GRPCClientTLS  *shared.GRPCClientTLS `yaml:"grpc_client_tls"`
	GrpcClient     client.Client         `yaml:"-"`
	ServiceAccount ServiceAccount        `yaml:"service_account"`
	Events         Events                `yaml:"-"`

	TokenManager                 *TokenManager                `yaml:"token_manager"`
	Reva                         *shared.Reva                 `yaml:"reva"`
	OCMD                         OCMD                         `yaml:"ocmd"`
	ScienceMesh                  ScienceMesh                  `yaml:"sciencemesh"`
	OCMInviteManager             OCMInviteManager             `yaml:"ocm_invite_manager"`
	OCMProviderAuthorizerDriver  string                       `` /* 191-byte string literal not displayed */
	OCMProviderAuthorizerDrivers OCMProviderAuthorizerDrivers `yaml:"ocm_provider_authorizer_drivers"`
	OCMShareProvider             OCMShareProvider             `yaml:"ocm_share_provider"`
	OCMCore                      OCMCore                      `yaml:"ocm_core"`
	OCMStorageProvider           OCMStorageProvider           `yaml:"ocm_storage_provider"`

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

Config combines all available configuration parts.

type Debug

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

Debug defines the available debug configuration.

type Events

type Events struct {
	Endpoint             string `` /* 241-byte string literal not displayed */
	Cluster              string `` /* 283-byte string literal not displayed */
	TLSInsecure          bool   `` /* 143-byte string literal not displayed */
	TLSRootCACertificate string `` /* 270-byte string literal not displayed */
	EnableTLS            bool   `` /* 253-byte string literal not displayed */
	AuthUsername         string `` /* 258-byte string literal not displayed */
	AuthPassword         string `` /* 258-byte string literal not displayed */
}

Events combine the configuration options for the event bus.

type GRPCConfig

type GRPCConfig struct {
	Addr      string                 `yaml:"addr" env:"OCM_GRPC_ADDR" desc:"The bind address of the GRPC service." introductionVersion:"1.0.0"`
	Namespace string                 `yaml:"-"`
	TLS       *shared.GRPCServiceTLS `yaml:"tls"`
	Protocol  string                 `` /* 135-byte string literal not displayed */
}

GRPCConfig defines the available grpc configuration.

type HTTPConfig

type HTTPConfig struct {
	Addr      string `yaml:"addr" env:"OCM_HTTP_ADDR" desc:"The bind address of the HTTP service." introductionVersion:"1.0.0"`
	Namespace string `yaml:"-"`
	Protocol  string `yaml:"protocol" env:"OCM_HTTP_PROTOCOL" desc:"The transport protocol of the HTTP service." introductionVersion:"1.0.0"`
	Prefix    string `` /* 129-byte string literal not displayed */
	CORS      CORS   `yaml:"cors"`
}

HTTPConfig defines the available http configuration.

type Log

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

Log defines the available log configuration.

type Middleware

type Middleware struct {
	Auth Auth `yaml:"auth"`
}

Middleware configures reva middlewares.

type OCMCore

type OCMCore struct {
	Driver  string         `` /* 142-byte string literal not displayed */
	Drivers OCMCoreDrivers `yaml:"drivers"`
}

type OCMCoreDrivers

type OCMCoreDrivers struct {
	JSON OCMCoreJSONDriver `yaml:"json"`
}

type OCMCoreJSONDriver

type OCMCoreJSONDriver struct {
	File string `` /* 210-byte string literal not displayed */
}

type OCMD

type OCMD struct {
	Prefix                     string `` /* 154-byte string literal not displayed */
	ExposeRecipientDisplayName bool   `` /* 165-byte string literal not displayed */
}

type OCMInviteManager

type OCMInviteManager struct {
	Driver          string                  `` /* 158-byte string literal not displayed */
	Drivers         OCMInviteManagerDrivers `yaml:"drivers"`
	TokenExpiration time.Duration           `` /* 139-byte string literal not displayed */
	Timeout         time.Duration           `` /* 153-byte string literal not displayed */
	Insecure        bool                    `` /* 192-byte string literal not displayed */
}

type OCMInviteManagerDrivers

type OCMInviteManagerDrivers struct {
	JSON OCMInviteManagerJSONDriver `yaml:"json"`
}

type OCMInviteManagerJSONDriver

type OCMInviteManagerJSONDriver struct {
	File string `` /* 299-byte string literal not displayed */
}

type OCMProviderAuthorizerDrivers

type OCMProviderAuthorizerDrivers struct {
	JSON OCMProviderAuthorizerJSONDriver `yaml:"json"`
}

type OCMProviderAuthorizerJSONDriver

type OCMProviderAuthorizerJSONDriver struct {
	Providers string `` /* 206-byte string literal not displayed */
}

type OCMShareProvider

type OCMShareProvider struct {
	Driver         string                  `` /* 162-byte string literal not displayed */
	Drivers        OCMShareProviderDrivers `yaml:"drivers"`
	Insecure       bool                    `` /* 192-byte string literal not displayed */
	WebappTemplate string                  `yaml:"webapp_template" env:"OCM_WEBAPP_TEMPLATE" desc:"Template for the webapp url." introductionVersion:"1.0.0"`
}

type OCMShareProviderDrivers

type OCMShareProviderDrivers struct {
	JSON OCMShareProviderJSONDriver `yaml:"json"`
}

type OCMShareProviderJSONDriver

type OCMShareProviderJSONDriver struct {
	File string `` /* 219-byte string literal not displayed */
}

type OCMStorageProvider

type OCMStorageProvider struct {
	Insecure      bool   `` /* 194-byte string literal not displayed */
	StorageRoot   string `` /* 185-byte string literal not displayed */
	DataServerURL string `` /* 227-byte string literal not displayed */
}

type ScienceMesh

type ScienceMesh struct {
	Prefix           string `` /* 168-byte string literal not displayed */
	MeshDirectoryURL string `` /* 132-byte string literal not displayed */
}

type Service

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

Service defines the available service configuration.

type ServiceAccount

type ServiceAccount struct {
	ID     string `` /* 226-byte string literal not displayed */
	Secret string `` /* 151-byte string literal not displayed */
}

ServiceAccount is the configuration for the used service account

type TokenManager

type TokenManager struct {
	JWTSecret string `` /* 131-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;OCM_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 206-byte string literal not displayed */
	Endpoint  string `` /* 132-byte string literal not displayed */
	Collector string `` /* 252-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