config

package
v0.0.0-...-7706d81 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: AGPL-3.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 CodeConfig

type CodeConfig struct {
	TTL       time.Duration `mapstructure:"ttl"`
	MaxLength int64         `mapstructure:"max-length"`
	MinLength int64         `mapstructure:"min-length"`
}

Code config variables.

type Config

type Config struct {
	GRPC     GRPCConfig     `mapstructure:"grpc"`
	Database DatabaseConfig `mapstructure:"database"`
	Code     CodeConfig     `mapstructure:"code"`
	Service  ServiceConfig  `mapstructure:"service"`
}

Config variables.

func NewConfig

func NewConfig() (*Config, error)

Creating a new config.

type DatabaseConfig

type DatabaseConfig struct{ Redis RedisConfig }

Database config variables.

type GRPCConfig

type GRPCConfig struct {
	Host string    `mapstructure:"host"`
	Port string    `mapstructure:"port"`
	TLS  TLSConfig `mapstructure:"tls"`
}

gRPC server config variables.

type RedisConfig

type RedisConfig struct{ URL string }

Redis config variables.

type Service

type Service struct {
	Addr string    `mapstructure:"addr"`
	TLS  TLSConfig `mapstructure:"tls"`
}

Service base config.

type ServiceConfig

type ServiceConfig struct {
	Email Service `mapstructure:"email"`
}

Services config variables.

type TLSConfig

type TLSConfig struct {
	Enable bool   `mapstructure:"enable"`
	CACert string `mapstructure:"ca-cert"`
	Cert   string `mapstructure:"cert"`
	Key    string `mapstructure:"key"`
}

TLS config variables.

Jump to

Keyboard shortcuts

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