config

package
v0.0.0-...-227add2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCreditional

type AuthCreditional struct {
	HMACSecret  string `yaml:"hmacSecret"`
	RSASecret   string `yaml:"rsaSecret"`
	ECDSASecret string `yaml:"ecdsaSecret"`
}

type ConfigMap

type ConfigMap struct {
	DebugMode       bool            `yaml:"-"`
	Service         Service         `yaml:"service"`
	Databases       Database        `yaml:"databases"`
	AuthCreditional AuthCreditional `yaml:"authCreditional"`
}
var Map ConfigMap = ConfigMap{}

func (*ConfigMap) GetDebugMode

func (cnf *ConfigMap) GetDebugMode() bool

func (*ConfigMap) LoadFromFile

func (cnf *ConfigMap) LoadFromFile(cfgPath string) error

func (*ConfigMap) SetDebugMode

func (cnf *ConfigMap) SetDebugMode(mode bool)

type Database

type Database struct {
	MongoDB Mongo `yaml:"mongoDB"`
}

type HTTPServer

type HTTPServer struct {
	Protocol string `yaml:"protocol"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
}

type Mongo

type Mongo struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Database string `yaml:"database"`
}

type Service

type Service struct {
	GRPCServer HTTPServer `yaml:"grpcServer"`
	HTTPServer HTTPServer `yaml:"httpServer"`
}

Jump to

Keyboard shortcuts

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