lc

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelsOpsReq

type ChannelsOpsReq struct {
	Channels struct {
		OP      string   `json:"__op"`
		Objects []string `json:"objects"`
	} `json:"channels"`
}

ChannelsOpsReq ...

type ChannelsReq

type ChannelsReq struct {
	Channels []string               `json:"channels"`
	Prod     string                 `json:"prod"`
	Data     map[string]interface{} `json:"data"`
	Where    map[string]interface{} `json:"where"`
}

ChannelsReq ...

type InstallationReq

type InstallationReq struct {
	DeviceType     string   `json:"deviceType"`
	DeviceToken    string   `json:"deviceToken"`
	InstallationID string   `json:"installationId"`
	Channels       []string `json:"channels"`
}

InstallationReq ...

type LeanCloud

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

LeanCloud ...

func New

func New(lcID, lcKey string) *LeanCloud

New makes a LeanCloud ...

func (*LeanCloud) PushChannels

func (lc *LeanCloud) PushChannels(r *ChannelsReq) (*Resp, error)

PushChannels ...

func (*LeanCloud) SaveInstallation

func (lc *LeanCloud) SaveInstallation(r *InstallationReq) (*Resp, error)

SaveInstallation ...

func (*LeanCloud) UnsubscribeChannel

func (lc *LeanCloud) UnsubscribeChannel(objectID string, c *ChannelsOpsReq) (*Resp, error)

UnsubscribeChannel ...

type Resp

type Resp struct {
	ObjectID  string    `json:"objectId"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Resp ...

Jump to

Keyboard shortcuts

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