config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	DBInfo *DBInfo `yaml:"db_info"`
	Server *Server `yaml:"server"`
	Log    *Log    `yaml:"log"`
}

func Parse

func Parse(filename string) (conf *Conf, err error)

type DBInfo

type DBInfo struct {
	NTunnelUrl string `yaml:"ntunnel_url"`
	Host       string `yaml:"host"`
	Port       string `yaml:"port"`
	DataBase   string `yaml:"database"`
	User       string `yaml:"user"`
	Password   string `yaml:"password"`
}

type Log

type Log struct {
	InfoLogFilename  string `yaml:"info_log_filename"`
	ErrorLogFilename string `yaml:"error_log_filename"`
}

type Server

type Server struct {
	Protocol         string `yaml:"protocol"`
	Address          string `yaml:"address"`
	Version          string `yaml:"version"`
	ConnReadTimeout  uint64 `yaml:"conn_read_timeout"`
	ConnWriteTimeout uint64 `yaml:"conn_write_timeout"`
	MaxConnections   uint64 `yaml:"max_connections"`
	UserName         string `yaml:"user_name"`
	UserPassword     string `yaml:"user_password"`
}

Jump to

Keyboard shortcuts

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