Documentation ¶
Index ¶
- Variables
- type Config
- type GetTicketResp
- type Option
- type SDK
- func (auth *SDK) CallGetTicket(ctx context.Context, accessToken string, typ string) (*GetTicketResp, error)
- func (auth *SDK) DecodeGetTicketResp(result map[string]string) *GetTicketResp
- func (auth *SDK) GetTicket(ctx context.Context, accessToken string, typ string, opts ...Option) (*GetTicketResp, error)
- func (auth *SDK) GetTicketRespFromRedis(ctx context.Context, key string) (*GetTicketResp, error)
- func (auth *SDK) SaveGetTicketRespToRedis(ctx context.Context, key string, tokenResp *GetTicketResp) error
Constants ¶
This section is empty.
Variables ¶
View Source
var URLGetTicket = "https://api.weixin.qq.com/cgi-bin/ticket/getticket"
Functions ¶
This section is empty.
Types ¶
type GetTicketResp ¶
type SDK ¶
type SDK struct { HttpCli *http.Client RedisCli redis.UniversalClient RedisSync *redsync.Redsync GetTicketKey string GetTicketLockerKey string Logger common.Logger }
func (*SDK) CallGetTicket ¶
func (*SDK) DecodeGetTicketResp ¶
func (auth *SDK) DecodeGetTicketResp(result map[string]string) *GetTicketResp
func (*SDK) GetTicketRespFromRedis ¶
func (*SDK) SaveGetTicketRespToRedis ¶
Click to show internal directories.
Click to hide internal directories.