config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileName = "app.config.yml"
)

Variables

View Source
var (
	AppConfig = &AppConfigType{}
)

Functions

func Init

func Init() error

Types

type AppConfigType

type AppConfigType struct {
	Port   int         `yaml:"port" toml:"port" json:"port"`
	Secret string      `yaml:"secret" toml:"secret" json:"secret"`
	Maria  MariaConfig `yaml:"maria" toml:"maria" json:"maria"`
	Keys   KeysConfig  `yaml:"keys" toml:"keys" json:"keys"`
}

type KeysConfig

type KeysConfig struct {
	Private string `yaml:"private" toml:"private" json:"private"`
	Public  string `yaml:"public" toml:"public" json:"public"`
}

type MariaConfig

type MariaConfig struct {
	Username string            `yaml:"username" toml:"username" json:"username"`
	Password string            `yaml:"password" toml:"password" json:"password"`
	Database string            `yaml:"database" toml:"database" json:"database"`
	Addr     string            `yaml:"addr" toml:"addr" json:"addr"`
	Conn     int               `yaml:"conn" toml:"conn" json:"conn"`
	Tables   MariaTablesConfig `yaml:"tables" toml:"tables" json:"tables"`
}

type MariaTablesConfig

type MariaTablesConfig struct {
	Users string `yaml:"users" toml:"users" json:"users"`
}

Jump to

Keyboard shortcuts

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