config

package
v0.0.0-...-f266b67 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: LGPL-2.1, LGPL-2.1-or-later Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadApp

func LoadApp()

LoadApp loads application configuration

func LoadConfig

func LoadConfig() error

LoadConfig initiates of config load

func LoadDB

func LoadDB()

LoadDB loads database configuration

func LoadEmailService

func LoadEmailService()

func LoadMinio

func LoadMinio()

func LoadPathMapping

func LoadPathMapping()

func LoadPaymentGateway

func LoadPaymentGateway()

func LoadRabbitMQ

func LoadRabbitMQ()

func PathMappingCfg

func PathMappingCfg() map[string]string

Types

type AMQP

type AMQP struct {
	Exchange      string
	ExchangeType  string
	BindingKey    string
	PrefetchCount int
}

type Application

type Application struct {
	Base          string
	Port          int
	LogLevel      LogLevel
	BackendUrl    string
	FrontStoreUrl string
	DashboardUrl  string
	JWTKey        string
}

Application holds the application configuration

func App

func App() *Application

App returns the default application configuration

type Database

type Database struct {
	Host                  string
	Port                  int
	Username              string
	Password              string
	Name                  string
	MaxOpenConnections    int
	MaxIdleConnections    int
	MaxConnectionLifetime time.Duration
}

Database holds the database configuration

func DB

func DB() Database

DB returns the default database configuration

type EmailServiceCfg

type EmailServiceCfg struct {
	SMTPHost         string
	SMTPPort         int
	SMTPUsername     string
	SMTPPassword     string
	FromEmailAddress string
}

func EmailService

func EmailService() EmailServiceCfg

type LogLevel

type LogLevel string
const (
	Debug    LogLevel = "debug"
	Info     LogLevel = "info"
	Warning  LogLevel = "warning"
	Critical LogLevel = "critical"
)

type MinioCfg

type MinioCfg struct {
	BaseURL      string
	ServeURL     string
	Key          string
	Secret       string
	Location     string
	Bucket       string
	SignDuration time.Duration
}

func Minio

func Minio() MinioCfg

type PathMapping

type PathMapping struct {
	Paths map[string]string
}

type PaymentGatewayCfg

type PaymentGatewayCfg struct {
	Name    string
	Configs map[string]interface{}
}

func PaymentGateway

func PaymentGateway() PaymentGatewayCfg

type RabbitMQCfg

type RabbitMQCfg struct {
	Broker        string
	DefaultQueue  string
	ResultBackend string
	AMQP          AMQP
	Worker        Worker
}

func RabbitMQ

func RabbitMQ() RabbitMQCfg

type Worker

type Worker struct {
	Name  string
	Count int
}

Jump to

Keyboard shortcuts

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