leancloud

package
v0.0.0-...-fad388b Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AndroidData

type AndroidData struct {
	Alert     string      `json:"alert,omitempty"`
	Alert2    string      `json:"alert2,omitempty"`
	Title     string      `json:"title,omitempty"`
	Action    string      `json:"action,omitempty"`
	PlaySound bool        `json:"play_sound"`
	Silent    bool        `json:"silent"`
	Custom    interface{} `json:"custom,omitempty"`
}

type IosAndroidData

type IosAndroidData struct {
	Ios     *IosData     `json:"ios,omitempty"`
	Android *AndroidData `json:"android,omitempty"`
}

type IosApnsAlert

type IosApnsAlert struct {
	Title        string   `json:"title,omitempty"`
	Body         string   `json:"body,omitempty"`
	ActionLocKey string   `json:"action-loc-key,omitempty"`
	LocKey       string   `json:"loc-key,omitempty"`
	LocArgs      []string `json:"loc-args,omitempty"`
	LaunchImage  string   `json:"launch-image,omitempty"`
}

type IosData

type IosData struct {
	Alert            *IosApnsAlert `json:"alert,omitempty"`
	Badge            int           `json:"badge,omitempty"`
	Sound            string        `json:"sound,omitempty"`
	ContentAvailable int           `json:"content-available,omitempty"`
	Custom           interface{}   `json:"custom,omitempty"`
}

type Leancloud

type Leancloud struct{}

func (Leancloud) Name

func (_ Leancloud) Name() string

func (Leancloud) PushNotif

func (l Leancloud) PushNotif(pushInfo map[appgo.Id]*appgo.PushInfo, content *appgo.PushData)

func (Leancloud) PushToChannel

func (l Leancloud) PushToChannel(channel string, content *appgo.PushData)

type LeancloudPush

type LeancloudPush struct {
	ExpirationInterval int             `json:"expiration_interval,omitempty"`
	Prod               string          `json:"prod,omitempty"`
	Data               *IosAndroidData `json:"data,omitempty"`
	Cql                string          `json:"cql,omitempty"`
	Channels           []string        `json:"channels,omitempty"`
}

Jump to

Keyboard shortcuts

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