configs

package
v0.0.0-...-c747ff1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server       `ini:"server"`
	MySQLConfig  `ini:"mysql"`
	SqliteConfig `ini:"sqlite"`
	OracleConfig `ini:"oracle"`
}
var SystemConfig *Config

SystemConfig global config

func Load

func Load(configFileMame string) (*Config, error)

Load get config from ini

type MySQLConfig

type MySQLConfig struct {
	Host             string `ini:"host"`
	Port             int    `ini:"port"`
	Dbname           string `ini:"dbname"`
	User             string `ini:"user"`
	Passwd           string `ini:"passwd"`
	Charset          string `ini:"charset"`
	MaxOpenConns     int    `ini:"maxOpenConns"`
	MaxIdleConns     int    `ini:"maxIdleConns"`
	MaxLifetimeConns int    `ini:"maxLifetimeConns"`
}

type OracleConfig

type OracleConfig struct {
	Host             string `ini:"host"`
	Port             int    `ini:"port"`
	Username         string `ini:"username"`
	Password         string `ini:"password"`
	Sid              string `ini:"sid"`
	MaxOpenConns     int    `ini:"maxOpenConns"`
	MaxIdleConns     int    `ini:"maxIdleConns"`
	MaxLifetimeConns int    `ini:"maxLifetimeConns"`
}

type Server

type Server struct {
	Host          string `ini:"host"`
	Port          int    `ini:"port"`
	ViewPattern   string `ini:"viewPattern"`
	StaticPattern string `ini:"staticPattern"`
	Env           string `ini:"env"`
	Dbtype        string `ini:"dbtype"`
}

type SqliteConfig

type SqliteConfig struct {
	Filename string `ini:"filename"`
}

Jump to

Keyboard shortcuts

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