Documentation ¶
Index ¶
- Variables
- func DBInit(dbname string)
- func DBInstall(installer DBInstaller)
- func GetOptions(key string) string
- func Hook(hash, position string, hook beego.FilterFunc, params ...bool)
- func Lib(base, dir string)
- func MySQL(conf_names ...string)
- func RegTable(models ...interface{})
- func Router(base string, routers []RouterIndex, config ...RouterConfig)
- func SetOptions(key, value string)
- func WWWROOT(config RouterConfig)
- type ApiResult
- type Base
- func (this *Base) ApiOut(result bool, obj ...interface{})
- func (this *Base) Default(json gjson.Result, defaults ...interface{}) gjson.Result
- func (this *Base) Die()
- func (this *Base) Err(obj ...interface{})
- func (this *Base) Finish()
- func (this *Base) GetJSON(keys ...string) gjson.Result
- func (this *Base) GetMap(key string) gjson.Result
- func (this *Base) Goto(url string)
- func (this *Base) Has(v interface{}, msgs ...string) *Base
- func (this *Base) HasAll(vs ...interface{}) *Base
- func (this *Base) MakeURL(url string) string
- func (this *Base) Ok(obj ...interface{})
- func (this *Base) Out(data string) *Base
- func (this *Base) PageErr(msg string)
- func (this *Base) ParseAllVData()
- func (this *Base) Prepare()
- func (this *Base) SetConfig(conf RouterConfig)
- func (this *Base) URL(urls ...string) string
- func (this *Base) V(key string, defaults ...interface{}) gjson.Result
- func (this *Base) View(files ...string)
- type BaseControllerInterface
- type BaseUtils
- type DBClass
- func (this *DBClass) Arr(seters ...interface{}) []orm.Params
- func (this *DBClass) Begin()
- func (this *DBClass) Commit()
- func (this *DBClass) Debug(b ...bool)
- func (this *DBClass) Delete(t interface{}, p ...string) (int64, error)
- func (this *DBClass) Disable(t interface{}, p ...string) (int64, error)
- func (this *DBClass) Enable(t interface{}, p ...string) (int64, error)
- func (this *DBClass) I(t interface{}) (int64, error)
- func (this *DBClass) Init(db ...string) *DBClass
- func (this *DBClass) Insert(t interface{}) (int64, error)
- func (this *DBClass) InsertMulti(c int, t interface{}) (int64, error)
- func (this *DBClass) One(seters ...interface{}) orm.Params
- func (this *DBClass) P(p ...interface{}) orm.RawSeter
- func (this *DBClass) Q(sql string, p ...interface{}) []orm.Params
- func (this *DBClass) Raw(sql string, p ...interface{}) orm.RawSeter
- func (this *DBClass) Read(t interface{}, p ...string) error
- func (this *DBClass) ReadOrCreate(t interface{}, p string, ps ...string) (bool, int64, error)
- func (this *DBClass) Rollback()
- func (this *DBClass) Select(p ...string) orm.QueryBuilder
- func (this *DBClass) SetDisable(t interface{})
- func (this *DBClass) SetEnable(t interface{})
- func (this *DBClass) T(f func()) (Rerr error)
- func (this *DBClass) Table(t interface{}) orm.QuerySeter
- func (this *DBClass) U(t interface{}, p ...string) (int64, error)
- func (this *DBClass) Update(t interface{}, p ...string) (int64, error)
- type DBInstaller
- type ErrorController
- type GoIndexController
- type HookAfterAction
- type HookBeforeAction
- type LibLoaderClass
- func (this *LibLoaderClass) Add(name string, libs ...string)
- func (this *LibLoaderClass) AddGroup(name string, libs ...string)
- func (this *LibLoaderClass) GetLoadHTML(name string, base ...string) (string, string)
- func (this *LibLoaderClass) LoadCSS(name string, base ...string) string
- func (this *LibLoaderClass) LoadJS(name string, base ...string) string
- type M
- type RouterConfig
- type RouterIndex
- type SettingsClass
- type SysSettings
- type TableBase
- type UploadResult
- type Uploader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( G M LibLoader LibLoaderClass )
View Source
var (
Cache cache.Cache
)
View Source
var (
Options map[string]string
)
Functions ¶
func DBInstall ¶
func DBInstall(installer DBInstaller)
func GetOptions ¶
func SetOptions ¶
func SetOptions(key, value string)
Types ¶
type ApiResult ¶
type ApiResult struct { Result bool `json:"result";` Code interface{} `json:"code";` Data interface{} `json:"data";` }
type Base ¶
type Base struct { UID int64 Post_JSON gjson.Result Config RouterConfig VData *fplib.SJSON BaseUtils beego.Controller }
type BaseControllerInterface ¶
type BaseControllerInterface interface { beego.ControllerInterface SetConfig(RouterConfig) }
type BaseUtils ¶
type BaseUtils struct{}
type DBClass ¶
func (*DBClass) InsertMulti ¶
批量插入
func (*DBClass) ReadOrCreate ¶
读取,没有就创建
func (*DBClass) Select ¶
func (this *DBClass) Select(p ...string) orm.QueryBuilder
通过查询字段返回QueryBuilder
type DBInstaller ¶
type DBInstaller interface {
Install()
}
type ErrorController ¶
type ErrorController struct {
Base
}
func (*ErrorController) Error401 ¶
func (this *ErrorController) Error401()
func (*ErrorController) Error403 ¶
func (this *ErrorController) Error403()
func (*ErrorController) Error404 ¶
func (this *ErrorController) Error404()
func (*ErrorController) Error500 ¶
func (this *ErrorController) Error500()
func (*ErrorController) Error501 ¶
func (this *ErrorController) Error501()
func (*ErrorController) Error503 ¶
func (this *ErrorController) Error503()
func (*ErrorController) ErrorDb ¶
func (this *ErrorController) ErrorDb()
type GoIndexController ¶
type GoIndexController struct {
beego.Controller
}
func (*GoIndexController) GoIndex ¶
func (this *GoIndexController) GoIndex()
type HookAfterAction ¶
type HookAfterAction interface {
After()
}
type LibLoaderClass ¶
func (*LibLoaderClass) Add ¶
func (this *LibLoaderClass) Add(name string, libs ...string)
func (*LibLoaderClass) AddGroup ¶
func (this *LibLoaderClass) AddGroup(name string, libs ...string)
func (*LibLoaderClass) GetLoadHTML ¶
func (this *LibLoaderClass) GetLoadHTML(name string, base ...string) (string, string)
type RouterConfig ¶
type RouterConfig struct { WebRoot string SrcRoot string ViewRoot string LibLoader *LibLoaderClass PageIndex []RouterIndex ApiIndex []RouterIndex fplib.Conf }
func NewRouterConfig ¶
func NewRouterConfig(p ...string) RouterConfig
type RouterIndex ¶
type SettingsClass ¶
type SettingsClass struct{}
var (
Settings SettingsClass
)
type SysSettings ¶
type SysSettings struct { Id int `orm:"auto;pk;description(ID)"` Key string `orm:"size(512);index;unique;description(key)"` Value string `orm:"null;type(text);description(value)"` CreateAt time.Time `orm:"auto_now_add;type(datetime);description(创建时间)"` UpdateAt time.Time `orm:"null;auto_now;type(datetime);description(更新时间)"` Remark string `orm:"null;type(text);description(备注)"` }
系统设置表
type TableBase ¶
type TableBase struct { Id int64 `orm:"auto;pk;description(ID)"` Status int64 `orm:"default(1);index;description(状态)"` CreateAt time.Time `orm:"auto_now_add;type(datetime);description(创建时间)"` UpdateAt time.Time `orm:"null;auto_now;type(datetime);description(更新时间)"` DeleteAt time.Time `orm:"null;type(datetime);description(删除时间)"` Remark string `orm:"null;type(text);description(备注)"` }
数据表的基础
type UploadResult ¶
Click to show internal directories.
Click to hide internal directories.