stats

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect(events []Event)

Collect the user's stats

func GetDeviceID

func GetDeviceID() (string, error)

GetDeviceID returns the current machine's device ID

func Init

func Init(appID string, appKey string) error

Init LeanCloud app info

Types

type ClientType

type ClientType struct {
	ID         string `json:"id"`
	Platform   string `json:"platform"`
	AppVersion string `json:"app_version"`
	AppChannel string `json:"app_channel"`
}

ClientType is collect payload's client field type

var Client ClientType

Client is current user's client info

type Event

type Event struct {
	Event string `json:"event"`
}

Event is collect payload's evnets field type

type Payload

type Payload struct {
	Client  ClientType  `json:"client"`
	Events  []Event     `json:"events"`
	Session SessionType `json:"session"`
}

Payload is leancloud statics collect's playload

type SessionType

type SessionType struct {
	ID string `json:"id"`
}

SessionType is collect payload's session filed type

Jump to

Keyboard shortcuts

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