handler

package
v0.0.0-...-532e3c5 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetaHandler

func MetaHandler(ctx context.Context, c *app.RequestContext, apiURL string)

func PushHandler

func PushHandler(ctx context.Context, c *app.RequestContext, apiURL string)

func TokenHandler

func TokenHandler(ctx context.Context, c *app.RequestContext, apiURL string)

Types

type Device

type Device struct {
	Platform    string `json:"platform"`
	DeviceToken string `json:"deviceToken"`
	Development bool   `json:"development,omitempty"`
}

type Msg

type Msg struct {
	Title       string `json:"title"`
	Body        string `json:"body"`
	Group       string `json:"group,omitempty"`
	GroupPrefix string `json:"groupPrefix,omitempty"`
	ClickType   string `json:"clickType"`
	Intent      string `json:"intent,omitempty"`
	Badge       int64  `json:"badge,omitempty"`
	Sound       bool   `json:"sound,omitempty"`
}

type PushReq

type PushReq struct {
	Devices []*Device `json:"devices"`
	Type    string    `json:"type"`
	Msg     *Msg      `json:"msg,omitempty"`
}

type TokenGetReq

type TokenGetReq struct {
	OrgCode   string `query:"orgCode"`
	Signature string `query:"signature"`
	Timestamp int64  `query:"timestamp"`
	Nonce     int64  `query:"nonce"`
}

Jump to

Keyboard shortcuts

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