kmgJpush

package
v0.0.0-...-05317bf Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotFoundUser error = errors.New("[kmgJpush] user not exist")

Functions

This section is empty.

Types

type Client

type Client struct {
	IsIosProduct bool

	Platform SystemPlatform
	IsActive bool
	// contains filtered or unexported fields
}

func NewClient

func NewClient(req NewClientRequest) *Client

func (*Client) EasyPush

func (c *Client) EasyPush(config *JpushConfig) (err error)

func (*Client) PushToAll

func (c *Client) PushToAll(content string) (err error)

func (*Client) PushToOne

func (c *Client) PushToOne(alias string, content string) (err error)

func (*Client) PushToTag

func (c *Client) PushToTag(tag string, content string) (err error)

type JpushConfig

type JpushConfig struct {
	Content string
	Alias   string
	Tag     string
	Badge   string
}

type NewClientRequest

type NewClientRequest struct {
	Name         string //这个客户端的名字
	AppKey       string
	Secret       string
	Platform     SystemPlatform //iOS、Android平台
	IsIosProduct bool           //如果是否false表示向测试设备推送,如果是true表示向正式设备推送,后台的那个开发与正式似乎没有作用.
	IsActive     bool
}

type SystemPlatform

type SystemPlatform string
const (
	Android     SystemPlatform = "Android"
	IOS         SystemPlatform = "iOS"
	AllPlatform SystemPlatform = "AllPlatform"
)

Jump to

Keyboard shortcuts

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