Documentation ¶
Index ¶
- Constants
- Variables
- func Covert(handler interface{}) gin.HandlerFunc
- func DBMap(columns []string, rows *sql.Rows) ([]interface{}, error)
- func Error(err error, msg ...string)
- func ErrorHandle() gin.HandlerFunc
- func ExecExpr(expr Expr, data map[string]interface{}) (string, error)
- func Task(f TaskFunc, cb func(), params ...interface{})
- func Throw(err string, code int, context *gin.Context)
- type Bean
- type Expr
- type Fairing
- type FairingHandler
- type GPA
- type GPAUtil
- type Goe
- func (this *Goe) AfterLaunch(exprs ...interface{})
- func (this *Goe) Attach(f ...Fairing) *Goe
- func (this *Goe) Beans(beans ...Bean) *Goe
- func (this *Goe) Config(cfgs ...interface{}) *Goe
- func (this *Goe) Handle(httpMethod, relativePath string, handler interface{}) *Goe
- func (this *Goe) Launch(port int32, funcs ...interface{})
- func (this *Goe) Mount(group string, classes ...IClass) *Goe
- func (this *Goe) Task(cron string, expr interface{}) *Goe
- type GoeTree
- type IClass
- type Json
- type JsonResponder
- type Model
- type Models
- type Param
- type Params
- type Query
- type Responder
- type Response
- type RouteInfo
- type RoutesInfo
- type SimpleQuery
- func (this SimpleQuery) Args() []interface{}
- func (this SimpleQuery) First() bool
- func (this SimpleQuery) Get() interface{}
- func (this SimpleQuery) Key() string
- func (this SimpleQuery) Mapping() map[string]string
- func (this SimpleQuery) Sql() string
- func (this SimpleQuery) WithArgs(args ...interface{}) *SimpleQueryWithArgs
- func (this SimpleQuery) WithFirst() *SimpleQueryWithArgs
- func (this SimpleQuery) WithKey(key string) *SimpleQueryWithArgs
- func (this SimpleQuery) WithMapping(mapping map[string]string) *SimpleQueryWithArgs
- type SimpleQueryWithArgs
- func NewSimpleQueryWithArgs(sql string, args []interface{}) *SimpleQueryWithArgs
- func NewSimpleQueryWithFetchFirst(sql string) *SimpleQueryWithArgs
- func NewSimpleQueryWithKey(sql string, key string) *SimpleQueryWithArgs
- func NewSimpleQueryWithMapping(sql string, mapping map[string]string) *SimpleQueryWithArgs
- func (this *SimpleQueryWithArgs) Args() []interface{}
- func (this *SimpleQueryWithArgs) First() bool
- func (this *SimpleQueryWithArgs) Get() interface{}
- func (this *SimpleQueryWithArgs) Key() string
- func (this *SimpleQueryWithArgs) Mapping() map[string]string
- func (this *SimpleQueryWithArgs) Sql() string
- func (this *SimpleQueryWithArgs) WithFirst() *SimpleQueryWithArgs
- func (this *SimpleQueryWithArgs) WithKey(key string) *SimpleQueryWithArgs
- func (this *SimpleQueryWithArgs) WithMapping(mapping map[string]string) *SimpleQueryWithArgs
- type SqlQueryResponder
- type SqlResponder
- type StringResponder
- type TaskExecutor
- type TaskFunc
- type Viewdeprecated
- type ViewResponder
- type Void
- type VoidResponder
Constants ¶
View Source
const (
HTTP_STATUS = "GOE_STATUS"
)
Variables ¶
View Source
var ( OK = NewResponse(0, "success") Err = NewResponse(1, "error") )
Functions ¶
func ErrorHandle ¶
func ErrorHandle() gin.HandlerFunc
Types ¶
type Fairing ¶
type Fairing interface { OnRequest(context *gin.Context) error OnResponse(ret interface{}) (interface{}, error) }
Fairing 规范中间件代码和功能的接口
type FairingHandler ¶
type FairingHandler struct {
// contains filtered or unexported fields
}
func NewFairingHandler ¶
func NewFairingHandler() *FairingHandler
func (*FairingHandler) AddFairing ¶
func (this *FairingHandler) AddFairing(f ...Fairing)
type GPAUtil ¶
type GPAUtil struct {
GDB GPA `inject:"-"`
}
func NewGPAUtil ¶
func NewGPAUtil() *GPAUtil
type GoeTree ¶
type GoeTree struct {
// contains filtered or unexported fields
}
func NewGoeTree ¶
func NewGoeTree() *GoeTree
type JsonResponder ¶
JsonResponder json数据处理
func (JsonResponder) RespondTo ¶
func (this JsonResponder) RespondTo() gin.HandlerFunc
type Params ¶
type Params []Param
Params is a Param-slice, as returned by the router. The slice is ordered, the first URL parameter is also the first slice value. It is therefore safe to read values by the index.
type Responder ¶
type Responder interface {
RespondTo() gin.HandlerFunc
}
type Response ¶ added in v0.0.2
type Response struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` }
func NewResponse ¶ added in v0.0.2
func (*Response) WithMessage ¶ added in v0.0.2
type RoutesInfo ¶
type RoutesInfo []RouteInfo
type SimpleQuery ¶
type SimpleQuery string
func (SimpleQuery) Args ¶
func (this SimpleQuery) Args() []interface{}
func (SimpleQuery) First ¶
func (this SimpleQuery) First() bool
func (SimpleQuery) Get ¶
func (this SimpleQuery) Get() interface{}
func (SimpleQuery) Key ¶
func (this SimpleQuery) Key() string
func (SimpleQuery) Mapping ¶
func (this SimpleQuery) Mapping() map[string]string
func (SimpleQuery) Sql ¶
func (this SimpleQuery) Sql() string
func (SimpleQuery) WithArgs ¶
func (this SimpleQuery) WithArgs(args ...interface{}) *SimpleQueryWithArgs
func (SimpleQuery) WithFirst ¶
func (this SimpleQuery) WithFirst() *SimpleQueryWithArgs
func (SimpleQuery) WithKey ¶
func (this SimpleQuery) WithKey(key string) *SimpleQueryWithArgs
func (SimpleQuery) WithMapping ¶
func (this SimpleQuery) WithMapping(mapping map[string]string) *SimpleQueryWithArgs
type SimpleQueryWithArgs ¶
type SimpleQueryWithArgs struct {
// contains filtered or unexported fields
}
func NewSimpleQueryWithArgs ¶
func NewSimpleQueryWithArgs(sql string, args []interface{}) *SimpleQueryWithArgs
func NewSimpleQueryWithFetchFirst ¶
func NewSimpleQueryWithFetchFirst(sql string) *SimpleQueryWithArgs
func NewSimpleQueryWithKey ¶
func NewSimpleQueryWithKey(sql string, key string) *SimpleQueryWithArgs
func NewSimpleQueryWithMapping ¶
func NewSimpleQueryWithMapping(sql string, mapping map[string]string) *SimpleQueryWithArgs
func (*SimpleQueryWithArgs) Args ¶
func (this *SimpleQueryWithArgs) Args() []interface{}
func (*SimpleQueryWithArgs) First ¶
func (this *SimpleQueryWithArgs) First() bool
func (*SimpleQueryWithArgs) Get ¶
func (this *SimpleQueryWithArgs) Get() interface{}
func (*SimpleQueryWithArgs) Key ¶
func (this *SimpleQueryWithArgs) Key() string
func (*SimpleQueryWithArgs) Mapping ¶
func (this *SimpleQueryWithArgs) Mapping() map[string]string
func (*SimpleQueryWithArgs) Sql ¶
func (this *SimpleQueryWithArgs) Sql() string
func (*SimpleQueryWithArgs) WithFirst ¶
func (this *SimpleQueryWithArgs) WithFirst() *SimpleQueryWithArgs
func (*SimpleQueryWithArgs) WithKey ¶
func (this *SimpleQueryWithArgs) WithKey(key string) *SimpleQueryWithArgs
func (*SimpleQueryWithArgs) WithMapping ¶
func (this *SimpleQueryWithArgs) WithMapping(mapping map[string]string) *SimpleQueryWithArgs
type SqlQueryResponder ¶
func (SqlQueryResponder) RespondTo ¶
func (this SqlQueryResponder) RespondTo() gin.HandlerFunc
type SqlResponder ¶
type SqlResponder func(*gin.Context) SimpleQuery
func (SqlResponder) RespondTo ¶
func (this SqlResponder) RespondTo() gin.HandlerFunc
type StringResponder ¶
StringResponder 字符串处理
func (StringResponder) RespondTo ¶
func (this StringResponder) RespondTo() gin.HandlerFunc
type TaskExecutor ¶
type TaskExecutor struct {
// contains filtered or unexported fields
}
TaskExecutor 任务执行者
func NewTaskExecutor ¶
func NewTaskExecutor(f TaskFunc, p []interface{}, callback func()) *TaskExecutor
type ViewResponder ¶
func (ViewResponder) RespondTo ¶
func (this ViewResponder) RespondTo() gin.HandlerFunc
type VoidResponder ¶
func (VoidResponder) RespondTo ¶
func (this VoidResponder) RespondTo() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.