forked from nikoksr/notify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.go
35 lines (27 loc) · 911 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
Package bark provides a service for sending messages to bark.
Usage:
package main
import (
"context"
"log"
"github.com/nikoksr/notify"
"github.com/nikoksr/notify/service/bark"
)
func main() {
// Create a bark service. `device key` is generated when you install the application. You can use the
// `bark.NewWithServers` function to create a service with a custom server.
barkService := bark.NewWithServers("your bark device key", bark.DefaultServerURL)
// Or use `bark.New` to create a service with the default server.
barkService = bark.New("your bark device key")
// Tell our notifier to use the bark service.
notify.UseServices(barkService)
// Send a test message.
_ = notify.Send(
context.Background(),
"Subject/Title",
"The actual message - Hello, you awesome gophers! :)",
)
}
*/
package bark