-
Notifications
You must be signed in to change notification settings - Fork 71
/
description.go
29 lines (26 loc) · 990 Bytes
/
description.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
package provider
// Description fully describes a provider.
//
// It contains the name of the provider, along with its current heath status
// and its capabilities.
type Description struct {
Name string `json:"name"`
Capabilities Capabilities `json:"capabilities"`
Health Health `json:"health"`
Enabled bool `json:"enabled"`
}
// Capabilities describes the available features in the provider. It specificie
// which input and output formats the provider supports, along with
// supported destinations.
type Capabilities struct {
InputFormats []string `json:"input"`
OutputFormats []string `json:"output"`
Destinations []string `json:"destinations"`
}
// Health describes the current health status of the provider. If indicates
// whether the provider is healthy or not, and if it's not healthy, it includes
// a message explaining what's wrong.
type Health struct {
OK bool `json:"ok"`
Message string `json:"message,omitempty"`
}