Documentation ¶
Index ¶
Constants ¶
View Source
const (
GoogleTranslator = "google"
)
Variables ¶
View Source
var TranslatorPool = &sync.Pool{ New: func() interface{} { t := config.GetTranslator() switch t { case GoogleTranslator: return google.NewGoogleTranslate() } return google.NewGoogleTranslate() }, }
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Code int `json:"code"` Timestamp int64 `json:"timestamp"` Message string `json:"message"` Data interface{} `json:"data"` }
todo: 状态码定义
func NewResponse ¶
type Translator ¶
type UserClaims ¶
func NewUserClaims ¶
func NewUserClaims(id int, name string) UserClaims
Click to show internal directories.
Click to hide internal directories.