configs

package
v0.0.0-...-d9936ee Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name    string `env-required:"true" yaml:"name" env:"APP_NAME"`
	Version string `env-required:"true" yaml:"version" env:"APP_VERSION"`
}

type HTTP

type HTTP struct {
	Host string `env-required:"true" yaml:"host" env:"HTTP_HOST"`
	Port int    `env-required:"true" yaml:"port" env:"HTTP_PORT"`
}

type HTTP2

type HTTP2 struct {
	Host string `env-required:"true" yaml:"host" env:"HTTP_HOST_2"`
	Port int    `env-required:"true" yaml:"port" env:"HTTP_PORT_2"`
}

type HTTPEcho

type HTTPEcho struct {
	HostEcho string `env-required:"true" yaml:"host" env:"HTTP_HOST_ECHO"`
	PortEcho int    `env-required:"true" yaml:"port" env:"HTTP_PORT_ECHO"`
}

type Jeager

type Jeager struct {
	HostJeager        string `env-required:"true" yaml:"host_jaeger" env:"HOST_JAEGER"`
	ServiceNameJeager string `env-required:"true" yaml:"service_name_jaeger" env:"SERVICE_NAME_JAEGER"`
	LogSpans          bool   `env-required:"true" yaml:"log_spans" env:"LOG_SPANS"`
}

type Ldap

type Ldap struct {
	LdapLogging      bool   `env:"LDAP_LOGGING" env-default:"true"`
	LdapConnection   string `env:"LDAP_CONNECTION" env-default:"default"`
	LdapHost         string `env:"LDAP_HOST" env-default:"localhost"`
	LdapBindDN       string `env:"LDAP_BIND_DN" env-default:"dc=example,dc=com"`
	LdapPassword     string `env:"LDAP_PASSWORD" env-default:"password"`
	LdapPort         int    `env:"LDAP_PORT" env-default:"389"`
	LdapBaseDN       string `env:"LDAP_BASE_DN" env-default:"dc=example,dc=com"`
	LdapTimeout      int    `env:"LDAP_TIMEOUT" env-default:"10"`
	LdapSSL          bool   `env:"LDAP_SSL" env-default:"false"`
	LdapTLS          bool   `env:"LDAP_TLS" env-default:"false"`
	LdapFilter       string `env:"LDAP_FILTER" env-default:"username"`
	LdapUserNameTest string `env:"LDAP_USERNAME_TEST" env-default:"username_test"`
	LdapPasswordTest string `env:"LDAP_PASSWORD_TEST" env-default:"password_test"`
}

func NewLdapConfig

func NewLdapConfig() (*Ldap, error)

type Log

type Log struct {
	Level             string `env-required:"true" yaml:"log_level" env:"LOG_LEVEL"`
	Dev               bool   `env-required:"true" yaml:"log_dev" env:"LOG_DEV"`
	DisableCaller     bool   `env-required:"true" yaml:"log_disable_caller" env:"LOG_DISABLE_CALLER"`
	DisableStacktrace bool   `env-required:"true" yaml:"log_disable_stacktrace" env:"LOG_DISABLE_STACKTRACE"`
	Encoding          string `env-required:"true" yaml:"log_encoding" env:"LOG_ENCODING"`
}

type Mail

type Mail struct {
	Host        string `env:"MAIL_HOST" env-default:"smtp.email.com"`
	Port        string `env:"MAIL_PORT" env-default:"587"`
	Password    string `env:"MAIL_PASSWORD" env-default:"password"`
	Encryption  string `env:"MAIL_ENCRYPTION" env-default:"tls"`
	FromAddress string `env:"MAIL_FROM_ADDRESS" env-default:"example@example.com"`
	FromName    string `env:"MAIL_FROM_NAME" env-default:"example"`
	Bcc         string `env:"MAIL_BCC" env-default:"dinhcanhng303@gmail.com"`
}

func NewConfigMail

func NewConfigMail() (*Mail, error)

type Metrics

type Metrics struct {
	HostMetric string `env-required:"true" yaml:"host" env:"HTTP_HOST_METRIC"`
	PortMetric int    `env-required:"true" yaml:"port" env:"HTTP_PORT_METRIC"`
}

type Minio

type Minio struct {
	EndPoint        string `env:"MINIO_ENDPOINT" env-default:"minio_endpoint"`
	AccessKeyID     string `env:"MINIO_ACCESS_KEY_ID" env-default:"access_key_id"`
	SecretAccessKey string `env:"MINIO_SECRET_ACCESS_KEY" env-default:"secret_access_key"`
	Region          string `env:"MINIO_DEFAULT_REGION" env-default:"region"`
	BucketName      string `env:"MINIO_BUCKET" env-default:"bucket"`
	RootFolder      string `env:"MINIO_ROOT_FOLDER" env-default:"folder"`
	UseSSL          bool   `env:"MINIO_USE_SSL" env-default:"false"`
}

func NewConfigMinio

func NewConfigMinio() (*Minio, error)

type Redis

type Redis struct {
	Host     string `env:"REDIS_HOST" env-default:"redis"`
	Port     string `env:"REDIS_PORT" env-default:"6379"`
	Password string `env:"REDIS_PASSWORD" env-default:"password"`
}

func NewConfigRedis

func NewConfigRedis() (*Redis, error)

type Request

type Request struct {
	RequestPerSecond int `env-required:"true" yaml:"request_per_second" env:"REQUEST_PER_SECOND"`
	RequestBurst     int `env-required:"true" yaml:"request_burst" env:"REQUEST_BURST"`
	RequestMax       int `env-required:"true" yaml:"request_max" env:"REQUEST_MAX"`
	DurationsSecond  int `env-required:"true" yaml:"durations_second" env:"DURATIONS_SECOND"`
}

Jump to

Keyboard shortcuts

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