common

package
v0.0.0-...-48fb7be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RKOpen            = "r:open:"
	RKOpenApp         = RKOpen + "app:"
	RKOpenUser        = RKOpen + "user:"
	RKOpenAccount     = RKOpen + "account:"
	RKOpenApi         = RKOpen + "api:"
	RKOpenApiCount    = RKOpen + "apiCount:"
	RKOpenAccountGate = RKOpen + "account:gate:"

	RKOpenAccountGateOpen = 1
)

Variables

This section is empty.

Functions

func CloseAccountGate

func CloseAccountGate(accountId uint64) error

func DelAccount

func DelAccount(userId uint64) error

func DelApi

func DelApi(method, uri string) error

func DelApiCount

func DelApiCount(appKey, method, uri string) error

func DelApp

func DelApp(appId string) error

func DelMpOpenId

func DelMpOpenId(scene string) error

func DelUser

func DelUser(userId string) error

func GetAccount

func GetAccount(userId uint64, data *models.Account) error

func GetAccountGate

func GetAccountGate(accountId uint64) (error, bool)

func GetApi

func GetApi(method, uri string, data *models.Api) error

func GetApiCount

func GetApiCount(appKey, method, uri string, data *models.ApiCount) error

func GetApp

func GetApp(appId string, as *models.App) error

func GetMpAccessToken

func GetMpAccessToken(appId string) string

func GetMpOpenId

func GetMpOpenId(scene string) (string, error)

func GetUser

func GetUser(userId string, user *models.User) error

func OpenAccountGate

func OpenAccountGate(accountId uint64) error

func SetAccount

func SetAccount(userId uint64, data models.Account) error

func SetApi

func SetApi(method, uri string, data models.Api) error

func SetApiCount

func SetApiCount(appKey, method, uri string, data models.ApiCount) error

func SetApp

func SetApp(appId string, as models.App)

SetApp appSecret 如果不允许更改的话,expire时间可以写很长,或者直接放在memory

func SetMpAccessToken

func SetMpAccessToken(appId string, token string)

func SetMpOpenId

func SetMpOpenId(scene, openId string)

func SetUser

func SetUser(userId string, user models.User)

func TeamMemberKey

func TeamMemberKey(teamId, userId int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL