Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJwtToken ¶
Types ¶
type Mysql ¶
type Mysql struct { Path string Config string `mapstructure:"config" json:"config" yaml:"config"` Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"` Username string `mapstructure:"username" json:"username" yaml:"username"` Password string `mapstructure:"password" json:"password" yaml:"password"` MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"` MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"` LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"` LogZap string `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"` LocalPath string `mapstructure:"localPath" json:"localPath" yaml:"localPath"` CloudPath string `mapstructure:"cloudPath" json:"cloudPath" yaml:"cloudPath"` DockerPath string `mapstructure:"dockerPath" json:"dockerPath" yaml:"dockerPath"` InnerDockerPath string `mapstructure:"innerDockerPath" json:"innerDockerPath" yaml:"innerDockerPath"` LocalPwd string `mapstructure:"localPwd" json:"localPwd" yaml:"localPwd"` DockerPwd string `mapstructure:"dockerPwd" json:"dockerPwd" yaml:"dockerPwd"` }
type THttp ¶
type THttp struct { Router *gin.Engine T *testing.T Url string Method string RequestBody io.Reader Writer *httptest.ResponseRecorder Request *http.Request }
type WxApp ¶
type WxApp struct { AppId string `mapstructure:"appId" json:"appId" yaml:"appId"` AppSecret string `mapstructure:"APPSECRET" json:"APPSECRET" yaml:"APPSECRET"` JwtLive time.Duration JwtSecret string `mapstructure:"jwtSecret" json:"jwtSecret" yarm:"jwtSecret"` }
func (WxApp) GetTokenInfo ¶
func (WxApp) NewJwtToken ¶
func (WxApp) WxLoginUrl ¶
type WxLoginInfo ¶
type WxLoginInfo struct { SessionKey string `json:"session_key"` Openid string `json:"openid"` ErrCode int `json:"errcode"` ErrMsg string `json:"errmsg"` Code string `json:"code"` }
func WxGetOpenidAndSessionKey ¶
func WxGetOpenidAndSessionKey(code string, wxApp WxApp) (wxLoginInfo WxLoginInfo, err error)
客户端传来code获取openid和sessionKey
func (WxLoginInfo) NewJwtToken ¶
func (w WxLoginInfo) NewJwtToken(versionInfo string, wxApp WxApp) (token string, err error)
Click to show internal directories.
Click to hide internal directories.