Documentation ¶
Index ¶
- Variables
- func CreateToken(appId string, openId string) (tokenStr string, err error)
- func FlagInit()
- func Init(env Environment)
- type Environment
- type OrderItem
- type Page
- type Response
- func HttpBadRequest(msg string) *Response
- func HttpFail(msg string) *Response
- func HttpFailForCode(code int64, msg string) *Response
- func HttpForbidden(msg string) *Response
- func HttpNotFound(msg string) *Response
- func HttpServerError(msg string) *Response
- func HttpSuccess(data interface{}) *Response
- func HttpSuccessByCode(code int64, data interface{}) *Response
- func HttpUnauthorized(msg string) *Response
- type Token
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateToken ¶ added in v1.0.17
func Init ¶ added in v1.0.14
func Init(env Environment)
Types ¶
type Environment ¶ added in v1.0.15
type Environment string
const ( PRODUCTION Environment = "pro" PRE Environment = "pre" RT Environment = "rt" TEST Environment = "test" DEVELOPMENT Environment = "dev" )
库运行模式 dev|test|rt|pre|pro go-zero
var Env Environment //string `json:",default=pro,options=dev|test|rt|pre|pro"`
当前运行环境
func (Environment) String ¶ added in v1.0.15
func (env Environment) String() string
func (Environment) Tag ¶ added in v1.0.15
func (env Environment) Tag() string
type Response ¶
type Response struct { Code int64 `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data,omitempty"` }
func HttpSuccessByCode ¶
Click to show internal directories.
Click to hide internal directories.