Documentation ¶
Index ¶
- func AddDb(s string, db *gorm.DB)
- func DB() *gorm.DB
- func DBN(s string) *gorm.DB
- func Db(c context.Context) (ret *gorm.DB, err error)
- func Done(c context.Context) func()
- func Err(c context.Context, err error) bool
- func Req(c context.Context) *http.Request
- func Res(c context.Context) http.ResponseWriter
- func Session(c context.Context) *fmodel.Session
- func SessionID(c context.Context) string
- func SetDefaultDB(db *gorm.DB)
- func Tenant(c context.Context) string
- func Vars(c context.Context) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Err ¶
Err responds the request stored on ctx with err.Error() and status http.StatusInternalServerError
func Res ¶
func Res(c context.Context) http.ResponseWriter
Res returns http.ResponseWriter stored on ctx under key model.CTX_RES
func SetDefaultDB ¶ added in v0.0.6
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.