config

package
v0.0.0-...-5122af3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthClient

type AuthClient struct {
	Host    string        `yaml:"host"`
	Port    string        `yaml:"port"`
	Timeout time.Duration `yaml:"timeout"`
}

type Config

type Config struct {
	Server     Server     `yaml:"server"`
	Database   DB         `yaml:"db"`
	JS         JS         `yaml:"js"`
	AuthClient AuthClient `yaml:"authClient"`
	InitCash   int
}

func GetConfigYML

func GetConfigYML(configYML string) *Config

type DB

type DB struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Username string `yaml:"user"`
	Password string `yaml:"password"`
	NameDB   string `yaml:"dbname"`
}

type JS

type JS struct {
	URL            string        `yaml:"url"`
	MaxReconnects  int           `yaml:"maxReconnects"`
	ReconnectWait  time.Duration `yaml:"reconnectWait"`
	ConnectTimeout time.Duration `yaml:"connectTimeout"`
	WorkerCount    int           `yaml:"workerCount"`
}

type Option

type Option func(*JS)

type Server

type Server struct {
	Host        string        `yaml:"host"`
	Port        string        `yaml:"port"`
	ReadTimeout time.Duration `yaml:"readTimeout"`
}

Jump to

Keyboard shortcuts

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