config

package
v0.0.0-...-1bfb889 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SysCache = &SysConfig{}

	DefaultConfig = map[string]string{
		"test":    "manifests/profiles/config.yaml",
		"debug":   "manifests/profiles/config.yaml",
		"release": "manifests/profiles/config.yaml",
	}
)
View Source
var (
	PlatformVersion = "v0.1.1" // Version platform version

	Project           = "/api" // default /api
	APIVersionV1      = "/v1"
	APICurrentVersion = APIVersionV1 // version of phdalios openapi
	GitCommit         = "default"    // get commit from git
)

Functions

func Cache2yaml

func Cache2yaml(conf *SysConfig) (err error)

func Watcher

func Watcher(mode string)

Types

type SysConfig

type SysConfig struct {
	HttpConfig struct {
		Port           uint16 `yaml:"port"`
		ReadTimeout    int    `yaml:"readTimeout"`
		WriteTimeout   int    `yaml:"writeTimeout"`
		MaxHeaderBytes int    `yaml:"maxHeaderBytes"`
	} `yaml:"httpConfig"`

	ServerConfig struct {
		LogLevel string `yaml:"logLevel"`
		Mode     string `yaml:"mode"`
		Storage  string `yaml:"storage"`
	} `yaml:"serverConfig"`

	GPT struct {
		OpenaiAPIKey string `yaml:"openaiApiKey"`
	} `yaml:"gpt"`

	DB struct {
		QdRant struct {
			CollectionName string `yaml:"collectionName"`
			Host           string `yaml:"host"`
			Port           string `yaml:"port"`
		} `yaml:"qdRant"`

		Mysql struct {
			User      string `yaml:"user"`
			Pwd       string `yaml:"pwd"`
			Host      string `yaml:"host"`
			Port      string `yaml:"port"`
			DBName    string `yaml:"dbName"`
			LogLevel  string `yaml:"logLevel"`
			Charset   string `yaml:"charset"`
			ParseTime string `yaml:"parseTime"`
			Loc       string `yaml:"loc"`
		} `yaml:"mysql"`
	} `yaml:"db"`
}

Jump to

Keyboard shortcuts

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