config.go 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * Copyright (c) 2022 Yansen Zhang
  3. * wxcomponent is licensed under Mulan PSL v2.
  4. * You can use this software according to the terms and conditions of the Mulan PSL v2.
  5. * You may obtain a copy of Mulan PSL v2 at:
  6. * http://license.coscl.org.cn/MulanPSL2
  7. * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  8. * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  9. * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  10. * See the Mulan PSL v2 for more details.
  11. **/
  12. package config
  13. import "time"
  14. type Config interface {
  15. // GetAppID 获取平台 APPID
  16. GetAppID() string
  17. // GetAppSecret 获取平台 APPSECRET
  18. GetAppSecret() string
  19. // GetAppSecret 获取平台消息校验Token
  20. GetMsgToken() string
  21. // GetToken 获取 Token
  22. GetAccessToken() string
  23. // RefreshToken 刷新 Token
  24. RefreshToken(token string, expire time.Time) error
  25. // GetTicket 获取票据
  26. GetVerifyTicket() string
  27. // RefreshTicket 刷新票据
  28. RefreshVerifyTicket(ticket string, expire time.Time) error
  29. }
  30. var conf Config