Documentation ¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, 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 Cancel()
- func FindPage(ses *xorm.Session, ls interface{}, page int64, size ...int64) (*bean.Page, error)
- func FindPages(gen *bean.PageGen, ls interface{}, page int64, size ...int64) (*bean.Page, error)
- func GetThirdApi(s string, host string) (*thirdapi.Client, error)
- type Config
- type SesFuncHandler
Constants ¶
View Source
const DATASOURCE_DRIVER_MYSQL = "mysql"
View Source
const DATASOURCE_DRIVER_POSTGRES = "postgres"
View Source
const DATASOURCE_DRIVER_SQLITE = "sqlite"
View Source
const StaticPkg = "" /* 3349192-byte string literal not displayed */
View Source
const Version = "1.3.7"
Variables ¶
View Source
var ( Cfg = Config{} Db *xorm.Engine BCache *bolt.DB WebEgn *gin.Engine HbtpEgn *hbtp.Engine IsMySQL = false Installed = false NotUpPass = false WorkPath = "" WebHost = "" )
View Source
var (
Ctx context.Context
)
View Source
var KeyNotFoundErr = errors.New("key not found")
View Source
var KeyOutTimeErr = errors.New("key is timeout")
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 CacheFlush ¶
func CacheFlush() error
Types ¶
type Config ¶
type Config struct { Server struct { Host string `yaml:"host"` //外网访问地址 LoginKey string `yaml:"loginKey"` RunLimit int `yaml:"runLimit"` HbtpHost string `yaml:"hbtpHost"` Secret string `yaml:"secret"` Shells []string `yaml:"shells"` DownToken string `yaml:"DownToken"` } `yaml:"server"` Datasource struct { Driver string `yaml:"driver"` Url string `yaml:"url"` } `yaml:"datasource"` }
type SesFuncHandler ¶
Click to show internal directories.
Click to hide internal directories.