Documentation ¶
Index ¶
- func EqualStringMap(a, b []string) bool
- type Destination
- type Destinations
- func (d *Destinations) Add(dest *Destination)
- func (d *Destinations) All() map[string]*Destination
- func (d *Destinations) Get(uuid string) *Destination
- func (d *Destinations) Load(filename string) error
- func (d *Destinations) Remove(uuid string)
- func (d *Destinations) Save(filename string) error
- func (d *Destinations) Trigger(uuid, body string) error
- type Message
- type Messages
- type Sender
- type SenderInterface
- type Senders
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualStringMap ¶
Types ¶
type Destination ¶
type Destination struct { UUID string `json:"uuid"` Name string `json:"name"` Type string `json:"type"` Labels models.Labels `json:"labels"` Sender string `json:"sender"` Destinations []string `json:"destinations"` }
func (*Destination) Equal ¶
func (d *Destination) Equal(dest *Destination) bool
type Destinations ¶
func NewDestinations ¶
func NewDestinations() *Destinations
func (*Destinations) Add ¶
func (d *Destinations) Add(dest *Destination)
func (*Destinations) All ¶
func (d *Destinations) All() map[string]*Destination
func (*Destinations) Get ¶
func (d *Destinations) Get(uuid string) *Destination
func (*Destinations) Load ¶
func (d *Destinations) Load(filename string) error
Load loads the rules from rules.json.
func (*Destinations) Remove ¶
func (d *Destinations) Remove(uuid string)
func (*Destinations) Save ¶
func (d *Destinations) Save(filename string) error
Save saves the rules to rules.json.
func (*Destinations) Trigger ¶
func (d *Destinations) Trigger(uuid, body string) error
type Sender ¶
type Sender struct { UUID string `json:"uuid"` Name string `json:"name"` Type string `json:"type"` Parameters json.RawMessage `json:"parameters"` }
type SenderInterface ¶
type SenderInterface interface { Trigger([]string, string) error Release([]string, string) error Destinations() (map[string]string, error) }
func NewSender ¶
func NewSender(t string, p json.RawMessage) SenderInterface
Click to show internal directories.
Click to hide internal directories.