xg

package
v0.0.0-...-396ab03 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultipleDeviceReq

type MultipleDeviceReq struct {
	SingleDeviceReq
	DeviceList []string `structs:"device_list"`
	PushID     string   `structs:"push_id"`
}

MultipleDeviceReq ...

type Req

type Req struct {
	AccessID  string `structs:"access_id"`
	TimeStamp string `structs:"timestamp"`
	ValidTime string `structs:"valid_time"`
	Sign      string `structs:"sign"`
}

Req ...

type Resp

type Resp struct {
	RetCode int    `json:"ret_code"`
	ErrMsg  string `json:"err_msg"`
	Result  struct {
		Status string `json:"status"`
		PushID string `json:"push_id"`
	} `json:"result"`
}

Resp ...

func MultiPush

func MultiPush(r *MultipleDeviceReq, secret string) (*Resp, error)

MultiPush ...

func SinglePush

func SinglePush(r *SingleDeviceReq, secret string) (*Resp, error)

SinglePush ...

func (*Resp) Success

func (resp *Resp) Success() bool

Success ...

type SingleDeviceReq

type SingleDeviceReq struct {
	Req
	DeviceToken string `structs:"device_token"`
	MessageType string `structs:"message_type"`
	Message     string `structs:"message"`
	ExpireTime  string `structs:"expire_time"`
	SendTime    string `structs:"send_time"`
	MultiPkg    string `structs:"multi_pkg"`
	Environment string `structs:"environment"`
}

SingleDeviceReq ...

Jump to

Keyboard shortcuts

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