eastiot

package
v1.0.160 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogTable = "eastiot"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.0.47

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

Client 实例

func NewClient added in v1.0.47

func NewClient(config *ClientConfig) (*Client, error)

NewClient 创建实例化

func (*Client) ConfigZapClientFun added in v1.0.141

func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)

ConfigZapClientFun 日志配置

func (*Client) Get added in v1.0.109

func (c *Client) Get(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)

func (*Client) GetApiKey added in v1.0.52

func (c *Client) GetApiKey() string

func (*Client) GetAppId added in v1.0.52

func (c *Client) GetAppId() string

func (*Client) IotApiGetAllSimType added in v1.0.47

func (c *Client) IotApiGetAllSimType(ctx context.Context) *IotApiGetAllSimTypeResult

IotApiGetAllSimType 卡类型列表查询 https://www.showdoc.com.cn/916774523755909/4858492092033167

func (*Client) IotApiQueryOrderedPkgInfo added in v1.0.47

func (c *Client) IotApiQueryOrderedPkgInfo(ctx context.Context, simId string) *IotApiQueryOrderedPkgInfoResult

IotApiQueryOrderedPkgInfo 查询流量卡已订购流量包 https://www.showdoc.com.cn/916774523755909/5092045889939625

func (*Client) IotApiQuerySimPkgInfo added in v1.0.47

func (c *Client) IotApiQuerySimPkgInfo(ctx context.Context, simId string, sd int) *IotApiQuerySimPkgInfoResult

IotApiQuerySimPkgInfo 流量卡可用流量包查询 https://www.showdoc.com.cn/916774523755909/4880284631482420

func (*Client) IotApiQueryUserBalance added in v1.0.47

func (c *Client) IotApiQueryUserBalance(ctx context.Context) *IotApiQueryUserBalanceResult

IotApiQueryUserBalance 余额查询 https://www.showdoc.com.cn/916774523755909/4857910459512420

func (*Client) IotApiQueryUserPkgInfo added in v1.0.47

func (c *Client) IotApiQueryUserPkgInfo(ctx context.Context) *IotApiQueryUserPkgInfoResult

IotApiQueryUserPkgInfo 账户可用流量包查询 https://www.showdoc.com.cn/916774523755909/4850094776758927

func (*Client) IotApiRechargeSim added in v1.0.47

func (c *Client) IotApiRechargeSim(ctx context.Context, notMustParams ...gorequest.Params) *IotApiRechargeSimResult

IotApiRechargeSim 单卡流量充值 https://www.showdoc.com.cn/916774523755909/4880284631482420

func (*Client) Post added in v1.0.109

func (c *Client) Post(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)

type ClientConfig added in v1.0.52

type ClientConfig struct {
	AppId  string
	ApiKey string
}

ClientConfig 实例配置

type IotApiGetAllSimTypeResponse added in v1.0.44

type IotApiGetAllSimTypeResponse struct {
	Code int64 `json:"code"`
	Data []struct {
		Type   int64  `json:"type"`   // 卡类型
		Name   string `json:"name"`   // 类型名
		MOrder int64  `json:"mOrder"` // 是否支持单次充值多个流量包,0:不支持 1:支持
	} `json:"data"`
	Msg string `json:"msg"`
}

type IotApiGetAllSimTypeResult

type IotApiGetAllSimTypeResult struct {
	Result IotApiGetAllSimTypeResponse // 结果
	Body   []byte                      // 内容
	Http   gorequest.Response          // 请求
	Err    error                       // 错误
}

type IotApiQueryOrderedPkgInfoResponse added in v1.0.44

type IotApiQueryOrderedPkgInfoResponse struct {
	Code   int64 `json:"code"`
	Istest int64 `json:"istest"`
	Data   []struct {
		Name      string  `json:"name"`      // 流量包名字
		PkgId     int64   `json:"pkgId"`     // 流量包ID
		Traffic   int64   `json:"traffic"`   // 流量大小,单位:MB
		Ntraffic  float64 `json:"ntraffic"`  // 已用量,单位:MB
		Starttime int64   `json:"starttime"` // 流量生效起始时间时间戳
		Endtime   int64   `json:"endtime"`   // 流量生效结束时间时间戳
		Addtime   int64   `json:"addtime"`   // 订购时间时间戳
	} `json:"data"`
	Msg string `json:"msg"`
}

type IotApiQueryOrderedPkgInfoResult

type IotApiQueryOrderedPkgInfoResult struct {
	Result IotApiQueryOrderedPkgInfoResponse // 结果
	Body   []byte                            // 内容
	Http   gorequest.Response                // 请求
	Err    error                             // 错误
}

type IotApiQuerySimPkgInfoResponse added in v1.0.44

type IotApiQuerySimPkgInfoResponse struct {
	Code   int64 `json:"code"`
	Istest int64 `json:"istest"`
	Data   []struct {
		PkgId   int64   `json:"pkgId"`   // 流量包ID
		PkgName string  `json:"pkgName"` // 流量包名字
		Price   float64 `json:"price"`   // 流量包成本价格,单位: 元
		Sprice  float64 `json:"sprice"`  // 流量包零售价格,单位: 元
		Traffic int64   `json:"traffic"` // 流量包大小,单位: MB
		Type    int64   `json:"type"`    // 流量包类型,1:叠加包 2:单月套餐 3:季度套餐 4:半年套餐 5:全年套餐 6:每月套餐 (3个月) 7:每月套餐(6个月) 8:每月套餐(12个月) 0:N天套餐
		Isdm    int64   `json:"isdm"`    // 是否依赖主套餐,此字段只有套餐类型为叠加包时有效; 1:依赖主套餐 0:独立
		Isnm    int64   `json:"isnm"`    // 是否支持次月生效,此字段只有套餐类型为独立叠加包时有效; 1:支持 0:不支持
		Istest  int64   `json:"istest"`  // 是否为体验包; 1:是 0:否
		Isimm   int64   `json:"isimm"`   // 订购后是否立即叠加生效; 1:是 0:否
		Stime   string  `json:"stime"`   // 套餐的生效起始日期
		Etime   string  `json:"etime"`   // 套餐的生效结束日期
		Daynum  int64   `json:"daynum"`  // 当type=0时,表示套餐有效天数;当type=8 且 daynum>0 时,表示套餐的有效年数
	} `json:"data"`
	Msg string `json:"msg"`
}

type IotApiQuerySimPkgInfoResult

type IotApiQuerySimPkgInfoResult struct {
	Result IotApiQuerySimPkgInfoResponse // 结果
	Body   []byte                        // 内容
	Http   gorequest.Response            // 请求
	Err    error                         // 错误
}

type IotApiQueryUserBalanceResponse added in v1.0.44

type IotApiQueryUserBalanceResponse struct {
	Code int64 `json:"code"`
	Data struct {
		Balance float64 `json:"balance"`
	} `json:"data"`
	Msg string `json:"msg"`
}

type IotApiQueryUserBalanceResult

type IotApiQueryUserBalanceResult struct {
	Result IotApiQueryUserBalanceResponse // 结果
	Body   []byte                         // 内容
	Http   gorequest.Response             // 请求
	Err    error                          // 错误
}

type IotApiQueryUserPkgInfoResponse added in v1.0.44

type IotApiQueryUserPkgInfoResponse struct {
	Code int64 `json:"code"`
	Data []struct {
		Type    int64   `json:"type"`
		PkgId   int64   `json:"pkgId"`
		PkgName string  `json:"pkgName"`
		Price   float64 `json:"price"`
		Sprice  float64 `json:"sprice"`
		Traffic int64   `json:"traffic"`
		Caltype int64   `json:"caltype"`
		SimType int64   `json:"simType"`
		Isdm    int64   `json:"isdm"`
		Isnm    int64   `json:"isnm"`
		Istest  int64   `json:"istest"`
		Isimm   int64   `json:"isimm"`
		Daynum  int64   `json:"daynum"`
	} `json:"data"`
	Msg string `json:"msg"`
}

type IotApiQueryUserPkgInfoResult

type IotApiQueryUserPkgInfoResult struct {
	Result IotApiQueryUserPkgInfoResponse // 结果
	Body   []byte                         // 内容
	Http   gorequest.Response             // 请求
	Err    error                          // 错误
}

type IotApiRechargeSimResponse added in v1.0.44

type IotApiRechargeSimResponse struct {
	Code int64  `json:"code"`
	Msg  string `json:"msg"`
}

type IotApiRechargeSimResult

type IotApiRechargeSimResult struct {
	Result IotApiRechargeSimResponse // 结果
	Body   []byte                    // 内容
	Http   gorequest.Response        // 请求
	Err    error                     // 错误
}

Jump to

Keyboard shortcuts

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