Documentation ¶
Index ¶
- Variables
- func CheckAppSecret(appId string, appSecret string) error
- func CheckGateway(gateway string) bool
- func CheckIfUserApp(appId string, userId int) (bool, error)
- func CheckName(name string) bool
- func CheckRedirectUriIsMatchUserGateway(redirectUri string, GateWay string) bool
- func CreateApp(userId int, appName string) (bool, error)
- func DeleteUserApp(appId string) (bool, error)
- func GetUserAppCount(userId int) (int, error)
- func ReGenerateSecret(appId string) (string, error)
- type AppBaseStruct
- type AppErr
- type AppFullInfoStruct
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAppNotExist = errors.New("app not exist") ErrAppSecretNotMatch = errors.New("app secret not match") )
Functions ¶
func CheckAppSecret ¶
CheckAppSecret @description: 检查appSecret
func CheckIfUserApp ¶
CheckIfUserApp 判断是否为该用户的app
func CheckRedirectUriIsMatchUserGateway ¶
CheckRedirectUriIsMatchUserGateway @description: 检测回调地址是否匹配用户网关
func ReGenerateSecret ¶
ReGenerateSecret 重新生成新的 appSecret
Types ¶
type AppBaseStruct ¶
type AppBaseStruct struct { Id int `json:"id"` AppId string `json:"app_id"` AppName string `json:"app_name"` CreateAt int64 `json:"create_time"` }
func GetUserAppList ¶
func GetUserAppList(userId, limit, offset int) ([]AppBaseStruct, error)
GetUserAppList @description: 获取用户app列表
type AppFullInfoStruct ¶
type AppFullInfoStruct struct { Id int `json:"id"` AppUserId int `json:"user_id"` AppId string `json:"app_id"` AppName string `json:"app_name"` AppSecret string `json:"app_secret"` AppGateway string `json:"app_gateway"` CreateAt int64 `json:"create_time"` }
func GetAppInfo ¶
func GetAppInfo(appId string) (AppFullInfoStruct, error)
Click to show internal directories.
Click to hide internal directories.