Documentation
¶
Index ¶
- Constants
- type BarkClient
- type LevelType
- type OnFailed
- type OnSuccess
- type PushOptions
- func (options *PushOptions) SetArchived() *PushOptions
- func (options *PushOptions) SetAutomaticallyCopy() *PushOptions
- func (options *PushOptions) SetCopyText(copyText string) *PushOptions
- func (options *PushOptions) SetGroup(group string) *PushOptions
- func (options *PushOptions) SetIconUrl(iconUrl string) *PushOptions
- func (options *PushOptions) SetLevel(level LevelType) *PushOptions
- func (options *PushOptions) SetOnFailed(OnFailedFunc OnFailed) *PushOptions
- func (options *PushOptions) SetOnSuccess(OnSuccessFunc OnSuccess) *PushOptions
- func (options *PushOptions) SetReceiver(receiver string) *PushOptions
- func (options *PushOptions) SetReceivers(receivers []string) *PushOptions
- func (options *PushOptions) SetSound(sound SoundType) *PushOptions
- func (options *PushOptions) SetTitle(title string) *PushOptions
- func (options *PushOptions) SetUrl(url string) *PushOptions
- type SoundType
Constants ¶
View Source
const ( DefaultDomain string = "api.day.app" DefaultSound SoundType = Alarm Alarm SoundType = "alarm" Anticipate SoundType = "anticipate" Bell SoundType = "bell" Birdsong SoundType = "birdsong" Bloom SoundType = "bloom" Calypso SoundType = "calypso" Chime SoundType = "chime" Choo SoundType = "choo" Descent SoundType = "descent" Electronic SoundType = "electronic" Fanfare SoundType = "fanfare" Glass SoundType = "glass" GotoSleep SoundType = "gotosleep" HealthNotification SoundType = "healthnotification" Horn SoundType = "horn" Ladder SoundType = "ladder" MailSend SoundType = "mailsend" Minuet SoundType = "minuet" MultiwayInvitation SoundType = "multiwayinvitation" NewMail SoundType = "newmail" NewsFlash SoundType = "newsflash" Noir SoundType = "noir" PaymentSuccess SoundType = "paymentsuccess" Shake SoundType = "shake" SherwoodForest SoundType = "sherwoodforest" Spell SoundType = "spell" Suspense SoundType = "suspense" Telegraph SoundType = "telegraph" Tiptoes SoundType = "tiptoes" Typewriters SoundType = "typewriters" Update SoundType = "update" Active LevelType = "active" TimeSensitive LevelType = "timeSensitive" Passive LevelType = "passive" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BarkClient ¶
type BarkClient struct {
Domain string
}
func (BarkClient) Push ¶
func (client BarkClient) Push(options *PushOptions) ([]string, error)
func (BarkClient) PushSimple ¶
type PushOptions ¶
type PushOptions struct {
Title string
Content string
Url string
Receivers []string
CopyText string
Sound SoundType
Group string
Level LevelType
IconUrl string // above iOS15
AutomaticallyCopy bool
IsArchive bool
OnSuccess OnSuccess // The listener of successful event
OnFailed OnFailed // The listener of failed event
}
func NewPushOptions ¶
func NewPushOptions(title string, content string) *PushOptions
func (*PushOptions) SetArchived ¶
func (options *PushOptions) SetArchived() *PushOptions
func (*PushOptions) SetAutomaticallyCopy ¶
func (options *PushOptions) SetAutomaticallyCopy() *PushOptions
func (*PushOptions) SetCopyText ¶
func (options *PushOptions) SetCopyText(copyText string) *PushOptions
func (*PushOptions) SetGroup ¶
func (options *PushOptions) SetGroup(group string) *PushOptions
func (*PushOptions) SetIconUrl ¶
func (options *PushOptions) SetIconUrl(iconUrl string) *PushOptions
func (*PushOptions) SetLevel ¶
func (options *PushOptions) SetLevel(level LevelType) *PushOptions
func (*PushOptions) SetOnFailed ¶
func (options *PushOptions) SetOnFailed(OnFailedFunc OnFailed) *PushOptions
func (*PushOptions) SetOnSuccess ¶
func (options *PushOptions) SetOnSuccess(OnSuccessFunc OnSuccess) *PushOptions
func (*PushOptions) SetReceiver ¶
func (options *PushOptions) SetReceiver(receiver string) *PushOptions
func (*PushOptions) SetReceivers ¶
func (options *PushOptions) SetReceivers(receivers []string) *PushOptions
func (*PushOptions) SetSound ¶
func (options *PushOptions) SetSound(sound SoundType) *PushOptions
func (*PushOptions) SetTitle ¶
func (options *PushOptions) SetTitle(title string) *PushOptions
func (*PushOptions) SetUrl ¶
func (options *PushOptions) SetUrl(url string) *PushOptions
Click to show internal directories.
Click to hide internal directories.