mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-12 07:33:23 +02:00
allow default-token and per-subscription tokens in client.yml
This commit is contained in:
parent
477c9d3ed5
commit
25be5b47e4
11 changed files with 572 additions and 65 deletions
client
|
@ -15,11 +15,13 @@ type Config struct {
|
|||
DefaultHost string `yaml:"default-host"`
|
||||
DefaultUser string `yaml:"default-user"`
|
||||
DefaultPassword *string `yaml:"default-password"`
|
||||
DefaultToken string `yaml:"default-token"`
|
||||
DefaultCommand string `yaml:"default-command"`
|
||||
Subscribe []struct {
|
||||
Topic string `yaml:"topic"`
|
||||
User string `yaml:"user"`
|
||||
Password *string `yaml:"password"`
|
||||
Token string `yaml:"token"`
|
||||
Command string `yaml:"command"`
|
||||
If map[string]string `yaml:"if"`
|
||||
} `yaml:"subscribe"`
|
||||
|
@ -31,6 +33,7 @@ func NewConfig() *Config {
|
|||
DefaultHost: DefaultBaseURL,
|
||||
DefaultUser: "",
|
||||
DefaultPassword: nil,
|
||||
DefaultToken: "",
|
||||
DefaultCommand: "",
|
||||
Subscribe: nil,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue