conf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug                     bool
	Production                bool
	DbConfigurationFile       string
	ZimpeDbConfigurationFile  string
	VerzDbConfigurationFile   string
	DialerDbConfigurationFile string
	DbConfiguration           *DbConfiguration
	ZimpeDbConfiguration      *DbConfiguration
	VerzDbConfiguration       *DbConfiguration
	DialerDbConfiguration     *DbConfiguration
	JwtSecret                 string
	// contains filtered or unexported fields
}

Config for the environment, read from a json file

func NewInitialConfig

func NewInitialConfig(fileName string) (Config, error)

func (*Config) Validate

func (cfg *Config) Validate() error

type ConfigBase

type ConfigBase struct {
	// contains filtered or unexported fields
}

func (*ConfigBase) ReadConfigurationFile

func (cfg *ConfigBase) ReadConfigurationFile(fileName string) ([]byte, error)

type DbConfiguration

type DbConfiguration struct {
	DBName   string `json:"dbname,omitempty"`
	Engine   string `json:"engine,omitempty"`
	Host     string `json:"host,omitempty"`
	Port     int    `json:"port,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func (*DbConfiguration) GetDSN

func (cfg *DbConfiguration) GetDSN() (string, error)

func (*DbConfiguration) Validate

func (cfg *DbConfiguration) Validate() error

type INewVoiceConfig

type INewVoiceConfig interface {
	Load(file string) error
	GetConfig() map[string]string
}

type MailGrid

type MailGrid struct {
	Host      string `json:"host_smtp"`
	LinkAPI   string `json:"linkAPI"`
	Username  string `json:"usuario_smtp"`
	Password  string `json:"senha_smtp"`
	Remetente string `json:"emailRemetente"`
	// contains filtered or unexported fields
}

func NewMailGrid

func NewMailGrid() *MailGrid

func (*MailGrid) GetConfig

func (b *MailGrid) GetConfig() map[string]interface{}

func (*MailGrid) Load

func (b *MailGrid) Load(file string) error

type Mailer

type Mailer struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	// contains filtered or unexported fields
}

func NewMailer

func NewMailer() *Mailer

func (*Mailer) GetConfig

func (b *Mailer) GetConfig() map[string]string

func (*Mailer) Load

func (b *Mailer) Load(file string) error

type NewVoiceConfig

type NewVoiceConfig struct {
	LinkAPI string `json:"linkAPI"`
	Code    string `json:"code"`
	Account string `json:"account"`
	// contains filtered or unexported fields
}

func NewNewVoiceConfig

func NewNewVoiceConfig() *NewVoiceConfig

func (*NewVoiceConfig) GetConfig

func (b *NewVoiceConfig) GetConfig() map[string]interface{}

func (*NewVoiceConfig) Load

func (b *NewVoiceConfig) Load(file string) error

Jump to

Keyboard shortcuts

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