123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /**
- * Copyright (c) 2022 Yansen Zhang
- * wxcomponent is licensed under Mulan PSL v2.
- * You can use this software according to the terms and conditions of the Mulan PSL v2.
- * You may obtain a copy of Mulan PSL v2 at:
- * http://license.coscl.org.cn/MulanPSL2
- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
- * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
- * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
- * See the Mulan PSL v2 for more details.
- **/
-
- package config
-
- import (
- "time"
- )
-
- type Config interface {
- // GetAppID 获取平台 APPID
- GetAppID() string
-
- // GetAppSecret 获取平台 APPSECRET
- GetAppSecret() string
-
- // GetAppSecret 获取平台消息校验Token
- GetMsgToken() string
-
- // GetToken 获取 Token
- GetAccessToken() string
-
- // RefreshToken 刷新 Token
- RefreshToken(token string, expire time.Time) error
-
- // GetTicket 获取票据
- GetVerifyTicket() string
-
- // RefreshTicket 刷新票据
- RefreshVerifyTicket(ticket string, expire time.Time) error
-
- // GetPushTicketState 是否开启票据推送服务
- GetPushTicketState() bool
-
- // RefreshPushTicketState 刷新票据推送服务状态
- RefreshPushTicketState(state bool)
- }
-
- var conf Config
|