* Improvement: use commit SHA to tag artifact * bugFix: inconsistent collation * Added Database migration for DevStar Studio 1.0 * Updated Transaction for table `user_wechat_official_account_openid` * WeChat Official Account binding/updating done * WeChat Official Account QR login Success
26 lines
744 B
Go
26 lines
744 B
Go
package wechat
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// ErrFailedToOperateWechatOfficialAccountUserDB 错误类型:打开数据库失败
|
|
type ErrFailedToOperateWechatOfficialAccountUserDB struct {
|
|
Action string
|
|
Message string
|
|
}
|
|
|
|
func (err ErrFailedToOperateWechatOfficialAccountUserDB) Error() string {
|
|
return fmt.Sprintf("Failed to %v in WeChat Official Account DB: %v", err.Action, err.Message)
|
|
}
|
|
|
|
// ErrWechatOfficialAccountUserNotExist 错误类型:找不到对应的微信公众号用户
|
|
type ErrWechatOfficialAccountUserNotExist struct {
|
|
AppID string
|
|
OpenID string
|
|
}
|
|
|
|
func (err ErrWechatOfficialAccountUserNotExist) Error() string {
|
|
return fmt.Sprintf("WeChat Official Account User not found: AppID = %v, OpenID = %v", err.AppID, err.OpenID)
|
|
}
|