config

package
v0.0.0-...-839bc5d Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 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 Authn

type Authn struct {
	Enabled   bool      `mapstructure:"enabled"`
	Method    string    `mapstructure:"method"`
	Preshared Preshared `mapstructure:"preshared"`
	Oidc      Oidc      `mapstructure:"oidc"`
}

Authn -.

type Cache

type Cache struct {
	NumberOfCounters int64  `mapstructure:"number_of_counters"`
	MaxCost          string `mapstructure:"max_cost"`
}

Cache -.

type Config

type Config struct {
	Server   `mapstructure:"server"`
	Log      `mapstructure:"logger"`
	Profiler `mapstructure:"profiler"`
	Authn    `mapstructure:"authn"`
	Tracer   `mapstructure:"tracer"`
	Meter    `mapstructure:"meter"`
	Service  `mapstructure:"service"`
	Database `mapstructure:"database"`
}

Config -

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig - Creates default config.

func NewConfig

func NewConfig() (*Config, error)

NewConfig - Creates new config

type Database

type Database struct {
	Engine                string        `mapstructure:"engine"`
	URI                   string        `mapstructure:"uri"`
	AutoMigrate           bool          `mapstructure:"auto_migrate"`
	MaxOpenConnections    int           `mapstructure:"max_open_connections"`
	MaxIdleConnections    int           `mapstructure:"max_idle_connections"`
	MaxConnectionLifetime time.Duration `mapstructure:"max_connection_lifetime"`
	MaxConnectionIdleTime time.Duration `mapstructure:"max_connection_idle_time"`
}

Database -.

type GRPC

type GRPC struct {
	Port      string    `mapstructure:"port"`
	TLSConfig TLSConfig `mapstructure:"tls"`
}

type HTTP

type HTTP struct {
	Enabled            bool      `mapstructure:"enabled"`
	Port               string    `mapstructure:"port"`
	TLSConfig          TLSConfig `mapstructure:"tls"`
	CORSAllowedOrigins []string  `mapstructure:"cors_allowed_origins"`
	CORSAllowedHeaders []string  `mapstructure:"cors_allowed_headers"`
}

HTTP -.

type Log

type Log struct {
	Level string `mapstructure:"level"`
}

Log -.

type Meter

type Meter struct {
	Enabled  bool   `mapstructure:"enabled"`
	Exporter string `mapstructure:"exporter"`
	Endpoint string `mapstructure:"endpoint"`
}

Meter -.

type Oidc

type Oidc struct {
	Issuer   string `mapstructure:"issuer"`
	ClientId string `mapstructure:"client_id"`
}

type Permission

type Permission struct {
	ConcurrencyLimit int   `mapstructure:"concurrency_limit"`
	Cache            Cache `mapstructure:"cache"`
}

Permission -.

type Preshared

type Preshared struct {
	Keys []string `mapstructure:"keys"`
}

type Profiler

type Profiler struct {
	Enabled bool   `mapstructure:"enabled"`
	Port    string `mapstructure:"port"`
}

Profiler -.

type Relationship

type Relationship struct{}

Relationship -.

type Schema

type Schema struct {
	Cache Cache `mapstructure:"cache"`
}

Schema -.

type Server

type Server struct {
	HTTP `mapstructure:"http"`
	GRPC `mapstructure:"grpc"`
}

type Service

type Service struct {
	CircuitBreaker bool         `mapstructure:"circuit_breaker"`
	Schema         Schema       `mapstructure:"schema"`
	Permission     Permission   `mapstructure:"permission"`
	Relationship   Relationship `mapstructure:"relationship"`
}

Service -.

type TLSConfig

type TLSConfig struct {
	Enabled  bool   `mapstructure:"enabled"`
	CertPath string `mapstructure:"cert"`
	KeyPath  string `mapstructure:"key"`
}

type Tracer

type Tracer struct {
	Enabled  bool   `mapstructure:"enabled"`
	Exporter string `mapstructure:"exporter"`
	Endpoint string `mapstructure:"endpoint"`
}

Tracer -.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL