Documentation ¶
Index ¶
Constants ¶
View Source
const (
Scheme = "bark"
)
Scheme is the identifying part of this service's configuration URL
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { standard.EnumlessConfig Title string `key:"title" default:"" desc:"Notification title, optionally set by the sender"` Host string `url:"host" desc:"Server hostname and port"` Path string `url:"path" default:"/" desc:"Server path"` DeviceKey string `url:"password" desc:"The key for each device"` Scheme string `key:"scheme" default:"https" desc:"Server protocol, http or https"` Sound string `key:"sound" default:"" desc:"Value from https://github.com/Finb/Bark/tree/master/Sounds"` Badge int64 `key:"badge" default:"0" desc:"The number displayed next to App icon"` Icon string `key:"icon" default:"" desc:"An url to the icon, available only on iOS 15 or later"` Group string `key:"group" default:"" desc:"The group of the notification"` URL string `key:"url" default:"" desc:"Url that will jump when click notification"` Category string `key:"category" default:"" desc:"Reserved field, no use yet"` Copy string `key:"copy" default:"" desc:"The value to be copied"` }
Config for use within the bark service
func (*Config) GetAPIURL ¶
GetAPIURL returns the API URL corresponding to the passed endpoint based on the configuration
type PushPayload ¶
type PushPayload struct { Body string `json:"body"` DeviceKey string `json:"device_key"` Title string `json:"title"` Sound string `json:"sound,omitempty"` Badge *int64 `json:"badge,omitempty"` Icon string `json:"icon,omitempty"` Group string `json:"group,omitempty"` URL string `json:"url,omitempty"` Category string `json:"category,omitempty"` Copy string `json:"copy,omitempty"` }
PushPayload is the notification payload for the bark notification service
type Service ¶
Service sends notifications Bark
func (*Service) Initialize ¶
Initialize loads ServiceConfig from configURL and sets logger for this Service
Click to show internal directories.
Click to hide internal directories.