send

package
v0.0.0-...-fd5dff8 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppIdFlag    = "app-id"
	AppIdDefault = ""
	AppIdDesc    = "app bundle ID"

	DataStringFlag      = "data"
	DataStringShortFlag = "d"
	DataStringDefault   = ""
	DataStringDesc      = "JSON formatted notification content"

	DeviceTokenFlag    = "device-token"
	DeviceTokenDefault = ""
	DeviceTokenDesc    = "APNs device token"

	SandboxFlag    = "sandbox"
	SandboxDefault = false
	SandboxDesc    = "use APNS sandbox endpoint"

	VerboseFlag      = "verbose"
	VerboseShortFlag = "v"
	VerboseDefault   = false
	VerboseDesc      = "enable verbose logging"
)
View Source
const (
	AlertTextFlag    = "alert-text"
	AlertTextDefault = ""
	AlertTextDesc    = "alert text"

	BadgeCountFlag    = "badge-count"
	BadgeCountDefault = 0
	BadgeCountDesc    = "badge count"

	SoundNameFlag    = "sound-name"
	SoundNameDefault = ""
	SoundNameDesc    = "sound name"
)
View Source
const (
	PriorityFlag    = "priority"
	PriorityDefault = ""
	PriorityDesc    = "value for 'apns-priority' header"

	PushTypeFlag    = "push-type"
	PushTypeDefault = ""
	PushTypeDesc    = "value for 'apns-push-type' header"
)

Variables

This section is empty.

Functions

func BindSendCommonFlags

func BindSendCommonFlags(flags *pflag.FlagSet, cmd *SendCmd)

func GetCommand

func GetCommand() *cobra.Command

func NewSendAlertCommand

func NewSendAlertCommand() *cobra.Command

func NewSendBackgroundCommand

func NewSendBackgroundCommand() *cobra.Command

func NewSendRawCommand

func NewSendRawCommand() *cobra.Command

Types

type SendAlertCmd

type SendAlertCmd struct {
	SendCmd

	AlertText  string
	BadgeCount int
	SoundName  string
}

func (*SendAlertCmd) Run

func (cmd *SendAlertCmd) Run() error

type SendBackgroundCmd

type SendBackgroundCmd struct {
	SendCmd

	DataString string
}

func (*SendBackgroundCmd) Run

func (cmd *SendBackgroundCmd) Run() error

type SendCmd

type SendCmd struct {
	AppId           string
	CertificateAuth auth.CertificateAuth
	DeviceToken     string
	Sandbox         bool
	TokenAuth       auth.TokenAuth
	Verbose         bool

	Client apns.Client
	IO     cmdio.CmdIO
}

type SendRawCmd

type SendRawCmd struct {
	SendCmd

	DataString string
	Priority   string
	PushType   string
}

func (*SendRawCmd) Run

func (cmd *SendRawCmd) Run() error

Jump to

Keyboard shortcuts

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