Documentation
¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func CacheFlush() error
- func CacheGet(key string) ([]byte, error)
- func CacheGets(key string, data interface{}) error
- func CacheSet(key string, data []byte, outm ...time.Duration) error
- func CacheSets(key string, data interface{}, outm ...time.Duration) error
- func GetThirdApi(s string, host string) (*thirdapi.Client, error)
- func InitConf() (rterr error)
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type Conf
- type DataSourceConf
- type Limit
- type MainRunnerConf
- type Runner
- type Server
Constants ¶
const ( // PathPrefix : / or \\ PathPrefix = string(filepath.Separator) // YamlDir : .giteego YamlDir = ".giteego" // Repo : repo Repo = "repo" // Build : build Build = "build" // Jobs : jobs Jobs = "jobs" // Plugs : plugins Plugs = "plugins" )
const StaticPkg = "" /* 15725808-byte string literal not displayed */
Variables ¶
var ( Port int32 Debugs = false Installed = false Web *gin.Engine //DBMain use getDB or get a new Session DBMain *dbcore.DBHelper //BCache bolt cache db BCache *bolt.DB )
var ( //BuildLimit BuildLimit = 10 //ParseLimit ParseLimit = 10 )
Limit is Maximum number of coroutines default value
var KeyNotFoundErr = errors.New("key not found")
var KeyOutTimeErr = errors.New("key is timeout")
var WorkPath = ""
WorkPath is :server workpath
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/
foo.txt
img/
a.png
b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func CacheFlush ¶
func CacheFlush() error
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Conf ¶
type Conf struct {
ServerConf *Server `yaml:"server" json:"server"`
RunnerConf *Runner `yaml:"runner" json:"runner"`
DataConf *DataSourceConf `yaml:"datasource" json:"datasource"`
}
Conf is main
var ( //MainCfg yaml config MainCfg *Conf )
type DataSourceConf ¶
type DataSourceConf struct {
Host string `yaml:"host"`
Port string `yaml:"port"`
Database string `yaml:"database"`
Username string `yaml:"username"`
Password string `yaml:"password"`
ShowSQL bool `yaml:"showsql"`
}
DataSourceConf is DataSource
type Limit ¶
type Limit struct {
BuildLimit int `yaml:"build" json:"build"`
ParseLimit int `yaml:"parse" json:"parse"`
}
Limit is Maximum number of coroutines
type MainRunnerConf ¶
type MainRunnerConf struct {
Enable bool `yaml:"enable"`
Workspace string `yaml:"workspace"`
Limit int `yaml:"limit"`
}
MainRunner conf