Documentation ¶
Index ¶
- Variables
- func ApiMain()
- func CallbackMain()
- type DcsTokenByRedis
- func (DcsTokenByRedis) Del(cacheKey string) error
- func (DcsTokenByRedis) Get(cacheKey string) apis.TokenInfo
- func (DcsTokenByRedis) Lock(cacheKey string, ttl time.Duration) bool
- func (DcsTokenByRedis) Set(cacheKey string, tokenInfo apis.TokenInfo, ttl time.Duration) error
- func (DcsTokenByRedis) Unlock(cacheKey string) error
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ShopAppId = "xxx" ShopAppSecret = "xxx" ShopCallbackToken = "xxx" ShopCallbackEncodingAESKey = "xxx" )
视频号小店配置,可在「视频号小店 - 服务市场 - 自研」中获得。
View Source
var ( WindowAppId = "xxx" WindowAppSecret = "xxx" WindowCallbackToken = "xxx" WindowCallbackEncodingAESKey = "xxx" )
视频号橱窗配置,可在「视频号助手 - 直播 - 开放能力」中获得
View Source
var ( RedisAddr = "localhost:6379" RedisPassword = "" RedisDB = 0 )
redis 配置
View Source
var CallbackRepo = new(callbackRepo)
Functions ¶
Types ¶
type DcsTokenByRedis ¶
type DcsTokenByRedis struct{}
实现 access_token 的 redis 存取方案
func (DcsTokenByRedis) Del ¶
func (DcsTokenByRedis) Del(cacheKey string) error
func (DcsTokenByRedis) Unlock ¶
func (DcsTokenByRedis) Unlock(cacheKey string) error
Click to show internal directories.
Click to hide internal directories.