common

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColUsers  = "users"
	ColMovies = "movies"
)

COLLECTIONs of the database table

View Source
const (
	ErrNameEmpty      = "Name is empty"
	ErrPasswordEmpty  = "Password is empty"
	ErrNotObjectIDHex = "String is not a valid hex representation of an ObjectId"
)

Status Text

View Source
const (
	StatusCodeUnknown = -1
	StatusCodeOK      = 1000

	StatusMismatch = 10
)

Status Code

View Source
const AGGTRADE string = "aggtrade"
View Source
const CONTENT_TYPE_JSON = "application/json"
View Source
const KLINE string = "kline"
View Source
const KLINEKEYPREFIX = "binance-kline-"
View Source
const PRICEDEPTH string = "pricedepth"
View Source
const PRICEDEPTHKEYPREFIX = "binance-pricedepth-"

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig() error

LoadConfig loads configuration from the config file

Types

type Configuration

type Configuration struct {
	Port                string `json:"port"`
	EnableGinConsoleLog bool   `json:"enableGinConsoleLog"`
	EnableGinFileLog    bool   `json:"enableGinFileLog"`

	LogFilename   string `json:"logFilename"`
	LogMaxSize    int    `json:"logMaxSize"`
	LogMaxBackups int    `json:"logMaxBackups"`
	LogMaxAge     int    `json:"logMaxAge"`

	MgAddrs      string `json:"mgAddrs"`
	MgDbName     string `json:"mgDbName"`
	MgDbUsername string `json:"mgDbUsername"`
	MgDbPassword string `json:"mgDbPassword"`

	JwtSecretPassword string `json:"jwtSecretPassword"`
	Issuer            string `json:"issuer"`
}

Configuration stores setting values

var (
	Config *Configuration
)

Config shares the global configuration

Jump to

Keyboard shortcuts

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