builder

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PlatformAndroid .
	PlatformAndroid TypePlatform = "android"
	// PlatformIOS .
	PlatformIOS TypePlatform = "ios"
	// PlatformWinPhone .
	PlatformWinPhone TypePlatform = "winphone"
	// ALL .
	ALL string = "all"
	// ALIAS .
	ALIAS string = "alias"
	// ALERT .
	ALERT string = "alert"
	// AUDIENCE .
	AUDIENCE string = "audience"
	// ApnsProduction is the apns production.
	ApnsProduction string = "apns_production"
	// BuilderID .
	BuilderID string = "builder_id"
	// ContentType .
	ContentType string = "content_type"
	// EXTRAS .
	EXTRAS string = "extras"
	// IosBadge .
	IosBadge string = "badge"
	// IosSound .
	IosSound string = "sound"
	// IosContentAvailable .
	IosContentAvailable string = "content-available"
	// MaxIosLength .
	MaxIosLength int = 220
	// MaxContentLength of the message.
	MaxContentLength int = 1200
	// MESSAGE .
	MESSAGE string = "message"
	// MsgContent .
	MsgContent string = "msg_content"
	// NOTIFICATION .
	NOTIFICATION string = "notification"
	// OverrideMsgID fileter the message by message id.
	OverrideMsgID string = "override_msg_id"
	// OPTIONS .
	OPTIONS string = "options"
	// PLATFORM .
	PLATFORM string = "platform"
	// SENDNO .
	SENDNO string = "sendno"
	// TAG .
	TAG string = "tag"
	// TagAnd .
	TagAnd string = "tag_and"
	// TITLE .
	TITLE string = "title"
	// TTL .
	TTL string = "time_to_live"
	// REGISTRATION .
	REGISTRATION string = "registration_id"
	// WpOpenPage .
	WpOpenPage string = "_open_page"
)

Variables

This section is empty.

Functions

func NewIOS

func NewIOS(alert string) *iOS

NewIOS .

Types

type Android

type Android NamedValue

Android .

func NewAndroid

func NewAndroid(alert string) *Android

NewAndroid .

func (*Android) AddBuilderID

func (a *Android) AddBuilderID(bid int) *Android

AddBuilderID .

func (*Android) AddExtras

func (a *Android) AddExtras(e *Extras) *Android

AddExtras .

func (*Android) AddTitle

func (a *Android) AddTitle(title string) *Android

AddTitle .

type Audience

type Audience map[string][]string

Audience .

func NewAudience

func NewAudience() *Audience

NewAudience .

func (*Audience) AddAlias

func (a *Audience) AddAlias(alias string) *Audience

AddAlias .

func (*Audience) AddCond

func (a *Audience) AddCond(key, value string) *Audience

AddCond .

func (*Audience) AddRegistrationID

func (a *Audience) AddRegistrationID(id string) *Audience

AddRegistrationID .

func (*Audience) AddTadAnd

func (a *Audience) AddTadAnd(tagAnd string) *Audience

AddTadAnd .

func (*Audience) AddTag

func (a *Audience) AddTag(tag string) *Audience

AddTag .

func (*Audience) Value

func (a *Audience) Value() interface{}

Value .

type AudienceTarget

type AudienceTarget struct {
	AudienceType string   `json:"audienceType"`
	Values       []string `json:"values"`
}

AudienceTarget .

type Builder

type Builder struct {
	Title                string                 `json:"title"`
	MsgContent           string                 `json:"msgContent"`
	ContentType          string                 `json:"contentType"`
	Extras               map[string]string      `json:"extrasBuilder"`
	NumberExtrasBuilder  map[string]int64       `json:"numberExtrasBuilder"`
	BooleanExtrasBuilder map[string]bool        `json:"booleanExtrasBuilder"`
	JSONExtrasBuilder    map[string]string      `json:"jsonExtrasBuilder"`
	CustomData           map[string]interface{} `json:"customData"`
}

Builder .

type Extras

type Extras NamedValue

Extras .

func NewExtras

func NewExtras() *Extras

NewExtras .

func (*Extras) Add

func (e *Extras) Add(name string, value interface{}) *Extras

Add .

type Message

type Message NamedValue

Message .

func NewMessage

func NewMessage(msgContent string) *Message

NewMessage .

func (*Message) AddContentType

func (m *Message) AddContentType(ct string) *Message

AddContentType .

func (*Message) AddExtras

func (m *Message) AddExtras(e *Extras) *Message

AddExtras .

func (*Message) AddTitle

func (m *Message) AddTitle(t string) *Message

AddTitle .

type NamedValue

type NamedValue map[string]interface{}

NamedValue .

type Notification

type Notification NamedValue

Notification .

func NewNotification

func NewNotification(defaultAlert string) *Notification

NewNotification .

func (*Notification) AddAndroid

func (n *Notification) AddAndroid(android *Android) *Notification

AddAndroid .

func (*Notification) AddIOS

func (n *Notification) AddIOS(ios *iOS) *Notification

AddIOS .

func (*Notification) AddWinPhone

func (n *Notification) AddWinPhone(wp *WinPhone) *Notification

AddWinPhone .

type Options

type Options NamedValue

Options .

func NewOptions

func NewOptions() *Options

NewOptions .

func (*Options) AddApnsProduction

func (o *Options) AddApnsProduction(ap bool) *Options

AddApnsProduction .

func (*Options) AddOverrideMsgID

func (o *Options) AddOverrideMsgID(omi int) *Options

AddOverrideMsgID .

func (*Options) AddSendNo

func (o *Options) AddSendNo(sn int) *Options

AddSendNo .

func (*Options) AddTimeToLive

func (o *Options) AddTimeToLive(ttl int) *Options

AddTimeToLive .

type Platform

type Platform []TypePlatform

Platform .

func NewPlatform

func NewPlatform() *Platform

NewPlatform .

func (*Platform) AddPlatform

func (p *Platform) AddPlatform(platform ...TypePlatform) *Platform

AddPlatform .

func (*Platform) Value

func (p *Platform) Value() interface{}

Value .

type PushPayload

type PushPayload NamedValue

PushPayload .

func NewPushPayload

func NewPushPayload(p *Platform, a *Audience) *PushPayload

NewPushPayload .

func (*PushPayload) AddMessage

func (p *PushPayload) AddMessage(m *Message) *PushPayload

AddMessage .

func (*PushPayload) AddNotification

func (p *PushPayload) AddNotification(n *Notification) *PushPayload

AddNotification .

func (*PushPayload) AddOptions

func (p *PushPayload) AddOptions(o *Options) *PushPayload

AddOptions .

func (*PushPayload) Build

func (p *PushPayload) Build(key string, comp interface{}) *PushPayload

Build .

func (*PushPayload) ToJSONString

func (p *PushPayload) ToJSONString() (string, error)

ToJSONString .

type SMS

type SMS struct {
}

SMS .

type TypePlatform

type TypePlatform string

TypePlatform .

type WinPhone

type WinPhone NamedValue

WinPhone .

func NewWinPhone

func NewWinPhone(alert string) *WinPhone

NewWinPhone .

func (*WinPhone) AddExtras

func (w *WinPhone) AddExtras(e *Extras) *WinPhone

AddExtras .

func (*WinPhone) AddOpenPage

func (w *WinPhone) AddOpenPage(op int) *WinPhone

AddOpenPage .

func (*WinPhone) AddTitle

func (w *WinPhone) AddTitle(title string) *WinPhone

AddTitle .

Jump to

Keyboard shortcuts

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