cloud

package
v2.10.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QQGiftSign added in v2.10.9

func QQGiftSign(method string, uri string, params url.Values, appKey string) string

Types

type BilibiliAuthResp added in v2.9.8

type BilibiliAuthResp struct {
	BilibiliCommonResp
	Data struct {
		Uid        int    `json:"uid"`
		AuthStatus int    `json:"auth_status"`
		AgeRange   string `json:"age_range"`
	} `json:"data"`
}

type BilibiliClient added in v2.9.8

type BilibiliClient struct {
	// contains filtered or unexported fields
}

func NewBilibiliClient added in v2.9.8

func NewBilibiliClient(conf BilibiliConfig) *BilibiliClient

func (*BilibiliClient) Auth added in v2.9.8

func (b *BilibiliClient) Auth(uid string) (*BilibiliAuthResp, error)

func (*BilibiliClient) GetApiKey added in v2.9.8

func (b *BilibiliClient) GetApiKey() int

func (*BilibiliClient) GetSign added in v2.9.8

func (b *BilibiliClient) GetSign(params map[string]any) string

func (*BilibiliClient) Login added in v2.9.8

func (b *BilibiliClient) Login(accessKey, uid string) (*BilibiliLoginResp, error)

func (*BilibiliClient) Req added in v2.9.8

func (b *BilibiliClient) Req(api string, tryTimes, apiKey int, params map[string]any) ([]byte, error)

func (*BilibiliClient) SetApiKey added in v2.9.8

func (b *BilibiliClient) SetApiKey(key int)

type BilibiliCommonResp added in v2.9.8

type BilibiliCommonResp struct {
	Code      int    `json:"code"`
	Message   string `json:"message"`
	Timestamp int    `json:"timestamp"`
}

type BilibiliConfig added in v2.9.8

type BilibiliConfig struct {
	Version    string   `json:"version" mapstructure:"version"`
	GameId     int      `json:"game_id" mapstructure:"game_id"`
	MerchantId int      `json:"merchant_id" mapstructure:"merchant_id"`
	SecretKey  string   `json:"secret_key" mapstructure:"secret_key"`
	ApiList    []string `json:"api_list" mapstructure:"api_list"`
}

type BilibiliLoginResp added in v2.9.8

type BilibiliLoginResp struct {
	BilibiliCommonResp
	OpenId int    `json:"open_id"`
	Uname  string `json:"uname"`
}

type BilibiliLogoutReq added in v2.9.9

type BilibiliLogoutReq struct {
	VoucherNo string `json:"voucher_no"`
	Uid       int    `json:"uid"`
	GameId    int    `json:"game_id"`
	Sign      string `json:"sign"`
}

type GiftParam added in v2.10.9

type GiftParam struct {
	AppID     int    `json:"appid" form:"appid"`
	PF        string `json:"pf,omitempty" form:"pf"`
	OpenID    string `json:"openid" form:"openid"`
	ServerID  string `json:"serverid" form:"serverid"`
	RoleID    string `json:"roleid" form:"roleid"`
	GiftID    string `json:"giftid" form:"giftid"`
	BillNo    string `json:"billno" form:"billno"`
	Timestamp uint64 `json:"ts" form:"ts"`
	Signature string `json:"sig" form:"sig"`
}

type GiftResult added in v2.10.9

type GiftResult struct {
	Ret int    `json:"ret"`
	Msg string `json:"msg"`
}

type IQQGiftClient added in v2.10.9

type IQQGiftClient interface {
	QQServerList(appId int, pf string) ServerList
	QQRoleList(appId int, pf, openId, serverId string) RoleList
	SendQQGift(param GiftParam, uri string) GiftResult
}

type ObsClient

type ObsClient struct {
	// contains filtered or unexported fields
}

func NewObsClient

func NewObsClient(cfg config.TecentOBS) *ObsClient

func (*ObsClient) CreateDir

func (c *ObsClient) CreateDir(key string) error

func (*ObsClient) Delete

func (c *ObsClient) Delete(key string) error

func (*ObsClient) DeleteDir

func (c *ObsClient) DeleteDir(key string) error

func (*ObsClient) FlushCdn added in v2.6.7

func (c *ObsClient) FlushCdn(cdnUrl, flushType string) error

func (*ObsClient) GetUrl added in v2.10.4

func (c *ObsClient) GetUrl(key string) *url.URL

func (*ObsClient) PutFile

func (c *ObsClient) PutFile(key, path string) error

func (*ObsClient) PutString

func (c *ObsClient) PutString(key, val string) error

type OppoClient added in v2.10.12

type OppoClient struct {
	// contains filtered or unexported fields
}

func NewOppoClient added in v2.10.12

func NewOppoClient(config OppoConfig) *OppoClient

func (*OppoClient) Login added in v2.10.12

func (c *OppoClient) Login(fileId, token string) (*OppoLoginResponse, error)

type OppoConfig added in v2.10.12

type OppoConfig struct {
	ApiUrl    string `json:"api_url" mapstructure:"api_url"`
	AppKey    string `json:"app_key" mapstructure:"app_key"`
	AppSecret string `json:"app_secret"  mapstructure:"app_secret"`
}

type OppoLoginItem added in v2.10.16

type OppoLoginItem struct {
	// contains filtered or unexported fields
}

func (*OppoLoginItem) String added in v2.10.16

func (item *OppoLoginItem) String() string

type OppoLoginResponse added in v2.10.12

type OppoLoginResponse struct {
	ResultCode string `json:"resultCode"`
	ResultMsg  string `json:"resultMsg"`
	SsoID      string `json:"ssoid"`
	UserName   string `json:"userName"`
	Email      string `json:"email"`
	Mobile     string `json:"mobileNumber"`
}

type QQGiftClient added in v2.10.9

type QQGiftClient struct {
	// contains filtered or unexported fields
}

func NewQQGiftClient added in v2.10.9

func NewQQGiftClient(client IQQGiftClient) *QQGiftClient

func (*QQGiftClient) QQRoleList added in v2.10.9

func (c *QQGiftClient) QQRoleList(appId int, pf, openId, serverId string) RoleList

func (*QQGiftClient) QQServerList added in v2.10.9

func (c *QQGiftClient) QQServerList(appId int, pf string) ServerList

func (*QQGiftClient) SendQQGift added in v2.10.9

func (c *QQGiftClient) SendQQGift(param GiftParam, uri string) GiftResult

type RoleInfo added in v2.10.9

type RoleInfo struct {
	RoleID        string `json:"roleid"`
	RoleName      string `json:"roleName"`
	CreateTime    int64  `json:"createTime"`
	Level         int    `json:"level"`
	Duration      int    `json:"duration"`
	Power         int    `json:"power"`
	LastLoginTime int64  `json:"lastLoginTime"`
}

type RoleList added in v2.10.9

type RoleList struct {
	Ret            int          `json:"ret"`
	Msg            string       `json:"msg"`
	ServerRoleInfo []ServerInfo `json:"serverRoleInfo"`
}

type ServerInfo added in v2.10.9

type ServerInfo struct {
	ServerID   string     `json:"serverid"`
	ServerName string     `json:"serverName"`
	StartTime  int64      `json:"startTime"`
	Status     int        `json:"status"`
	ActArray   []RoleInfo `json:"actArray"`
}

type ServerList added in v2.10.9

type ServerList struct {
	Ret             int          `json:"ret"`
	Msg             string       `json:"msg"`
	RecentServer    []ServerInfo `json:"recentServer"`
	RecommendServer []ServerInfo `json:"recommendServer"`
	AllServer       []ServerInfo `json:"allServer"`
}

type SmsClient added in v2.8.0

type SmsClient struct {
	SdkAppid string
	SignName string
	// contains filtered or unexported fields
}

func NewSmsClient added in v2.8.0

func NewSmsClient(cfg config.TecentSms) *SmsClient

func (*SmsClient) SendMsg added in v2.8.0

func (s *SmsClient) SendMsg(phone, tplId string, args []string) (*sms.SendSmsResponse, error)

type TiktokClient added in v2.9.3

type TiktokClient struct {
	// contains filtered or unexported fields
}

func NewTiktokClient added in v2.9.3

func NewTiktokClient(appId int32, secretKey string) *TiktokClient

func (*TiktokClient) GetSign added in v2.9.3

func (t *TiktokClient) GetSign(params map[string]any) string

func (*TiktokClient) VerifyUser added in v2.9.3

func (t *TiktokClient) VerifyUser(token string) (*VerifyUserResponse, error)

type VerifyUserResponse added in v2.9.3

type VerifyUserResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    struct {
		SdkOpenId string `json:"sdk_open_id"`
		Nickname  string `json:"nickname"`
		AvatarUrl string `json:"avatar_url"`
		AgeType   int32  `json:"age_type"`
	} `json:"data"`
	LogId string `json:"log_id"`
}

type VivoClient added in v2.10.12

type VivoClient struct {
	// contains filtered or unexported fields
}

func NewVivoClient added in v2.10.12

func NewVivoClient(list []string) *VivoClient

func (*VivoClient) GetApiKey added in v2.10.12

func (b *VivoClient) GetApiKey() int

func (*VivoClient) Login added in v2.10.12

func (b *VivoClient) Login(authtoken string) (*VivoLoginResp, error)

func (*VivoClient) Req added in v2.10.12

func (b *VivoClient) Req(api string, tryTimes, apiKey int, params map[string]string) ([]byte, error)

func (*VivoClient) SetApiKey added in v2.10.12

func (b *VivoClient) SetApiKey(key int)

type VivoLoginResp added in v2.10.12

type VivoLoginResp struct {
	RetCode int `json:"retcode"`
	Data    struct {
		OpenID string `json:"openid"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL