config

package
v0.0.0-...-d5de6aa Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Cert string `env:"OUTIS_CERTIFICATE_CERT"`
	Key  string `env:"OUTIS_CERTIFICATE_KEY"`
	CA   string `env:"OUTIS_CERTIFICATE_CA"`
}

Certificate configure the settings for a certificate

func (*Certificate) Validate

func (c *Certificate) Validate() error

Validate validate data structure settings

type Config

type Config struct {
	Database Database
}

func Get

func Get() *Config

func Load

func Load() Config

func (*Config) Validate

func (s *Config) Validate() error

Validate validate data structure settings

type Database

type Database struct {
	Name string `env:"OUTIS_DB_NAME"`
	User string `env:"OUTIS_DB_USER"`
	Pass string `env:"OUTIS_DB_PASS"`
	Host string `env:"OUTIS_DB_HOST"`
	Port string `env:"OUTIS_DB_PORT"`

	MaxOpenConns    int `env:"OUTIS_DB_OPEN_CONNS"`
	MaxIdleConns    int `env:"OUTIS_DB_IDLE_CONNS"`
	Timeout         int `env:"OUTIS_DB_TIMEOUT"`
	ConnMaxLifetime int `env:"OUTIS_DB_CONN_MAX_LIFETIME"`
	ConnMaxIdleTime int `env:"OUTIS_DB_MAX_IDLE_TIME"`

	Cert SSL
}

Database configure the settings for a database

func (*Database) Validate

func (db *Database) Validate() error

Validate validate data structure settings

type SSL

type SSL struct {
	Mode        string `env:"OUTIS_SSL_MODE"`
	Certificate Certificate
}

SSL configure the settings for a SSL

func (*SSL) Validar

func (c *SSL) Validar() error

Validate validate data structure settings

Jump to

Keyboard shortcuts

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