Documentation
¶
Index ¶
- func InitCOS(c utils.COSConfig)
- func InitEmail(c utils.EmailConfig)
- func InitWeChat(c utils.WechatConfig)
- type COSService
- func (s *COSService) DeleteFile(name string) error
- func (s *COSService) SaveBase64File(name, base string) (url string, err error)
- func (s *COSService) SaveByteFile(name string, data []byte) (url string, err error)
- func (s *COSService) SaveFile(name string, file multipart.File) (url string, err error)
- func (s *COSService) SaveURLFile(name string, fileURL string) (url string, err error)
- type EmailService
- type OAuthService
- type WeChatError
- type WeChatMakeImageReq
- type WeChatService
- type WeChatSessionRes
- type WeChatTokenRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type COSService ¶
COSService 对象存储服务
func (*COSService) SaveBase64File ¶
func (s *COSService) SaveBase64File(name, base string) (url string, err error)
SaveBase64File 保存 Base64 文件
func (*COSService) SaveByteFile ¶
func (s *COSService) SaveByteFile(name string, data []byte) (url string, err error)
SaveByteFile 保存二进制文件数据
func (*COSService) SaveURLFile ¶
func (s *COSService) SaveURLFile(name string, fileURL string) (url string, err error)
SaveURLFile 保存链接文件数据
type EmailService ¶
EmailService 邮件服务
func (*EmailService) SendAuthEmail ¶
func (s *EmailService) SendAuthEmail(id primitive.ObjectID, to, code string) error
SendAuthEmail 发送认证邮件
type OAuthService ¶
OAuthService Violet 授权服务
type WeChatError ¶
WeChatError 微信错误码
type WeChatMakeImageReq ¶
type WeChatMakeImageReq struct {
Scene string `json:"scene"`
}
WeChatMakeImageReq 生成微信小程序码请求
type WeChatService ¶
WeChatService 微信小程序服务
type WeChatSessionRes ¶
type WeChatSessionRes struct {
WeChatError
OpenID string `json:"openid"`
SessionKey string `json:"session_key"`
UnionID string `json:"unionid"`
}
WeChatSessionRes 微信登陆数据
type WeChatTokenRes ¶
type WeChatTokenRes struct {
WeChatError
AccessToken string `json:"access_token"`
Expires int64 `json:"expires_in"`
}
WeChatTokenRes 微信 Token 数据
Click to show internal directories.
Click to hide internal directories.