veinsdk

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTimedToken

func MakeTimedToken(data, secret string, expire int64) (string, error)

func MapToUrlencoded

func MapToUrlencoded(m map[string]interface{}, secretKey string) string

Types

type SDK

type SDK struct {
	Gateway   string
	AppID     string
	AppSecret string
}

func New

func New(gate, appid, secret string) *SDK

func (*SDK) ApiRequest

func (client *SDK) ApiRequest(method string, jsonObject map[string]interface{}) (resp xljson.JsonObject, err error)

ApiRequest API封装请求

func (*SDK) GetNonce

func (client *SDK) GetNonce() string

GetNonce 获取随机字符串

func (*SDK) GetSign

func (client *SDK) GetSign(jsonObject map[string]interface{}) string

GetSign 参数签名

func (*SDK) ProduceIMToken

func (client *SDK) ProduceIMToken(userTag string) (string, error)

ProduceIMToken 获取用户Token

func (*SDK) PushMessage

func (client *SDK) PushMessage(sendTo string, message map[string]interface{}) (resp xljson.JsonObject, err error)

func (*SDK) Request

func (client *SDK) Request(path string, jsonObject map[string]interface{}) (string, error)

Request 基础请求接口

Jump to

Keyboard shortcuts

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