config

package
v0.0.0-alpha7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Path        = "config/config.yaml"
	DefaultPath = "default.config.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authn

type Authn struct {
	Enabled bool     `yaml:"enabled"`
	Keys    []string `yaml:"keys"`
}

Authn -.

type Config

type Config struct {
	Server   `yaml:"server"`
	Log      `yaml:"logger"`
	*Authn   `yaml:"authn"`
	*Tracer  `yaml:"tracer"`
	Database `yaml:"database"`
}

Config -.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns permify config.

type Database

type Database struct {
	Engine   string `env-required:"true" yaml:"engine"`
	PoolMax  int    `yaml:"pool_max"`
	Database string `yaml:"database"`
	URI      string `yaml:"uri"`
}

Database -.

type GRPC

type GRPC struct {
	Port      string     `env-required:"true" yaml:"port"`
	TLSConfig *TLSConfig `yaml:"tls_config"`
}

type HTTP

type HTTP struct {
	Enabled            bool       `yaml:"enabled"`
	Port               string     `env-required:"true" yaml:"port"`
	TLSConfig          *TLSConfig `yaml:"tls_config"`
	CORSAllowedOrigins []string   `yaml:"cors_allowed_origins"`
	CORSAllowedHeaders []string   `yaml:"cors_allowed_headers"`
}

HTTP -.

type Log

type Log struct {
	Level string `env-required:"true" yaml:"level"`
}

Log -.

type Server

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

type TLSConfig

type TLSConfig struct {
	CertPath string `yaml:"cert_path"`
	KeyPath  string `yaml:"key_path"`
}

type Tracer

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

Tracer -.

Jump to

Keyboard shortcuts

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