config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_DRIVER   = "driver"
	DB_USER     = "username"
	DB_PASSWORD = "password"
	DB_HOST     = "host"
	DB_PORT     = "port"
	DB_DATABASE = "database"

	// 模型迁移选项,service指model.json,app指默认app:defaultApp.json
	// 取值范围:
	// sync 强制同步
	// install 未安装时安装
	MIGRATION = "migration"
)
View Source
const (
	MIGRATION_SYNC    = "sync"
	MIGRATION_INSTALL = "install"
)
View Source
const (
	TRUE  = "true"
	FALSE = "false"
)
View Source
const (
	PATH        = "."
	CONFIG_TYPE = "yaml"
	CONFIG_NAME = "config"
)
View Source
const TABLE_NAME_MAX_LENGTH = 64

Variables

This section is empty.

Functions

func GetBool

func GetBool(key string) bool

func GetDbConfig

func GetDbConfig() db.DbConfig

func GetInt

func GetInt(key string) int

func GetString

func GetString(key string) string

Types

type Config

type Config interface {
	// contains filtered or unexported methods
}

type EnvConfig

type EnvConfig struct {
	// contains filtered or unexported fields
}

type FileConfig

type FileConfig struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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