-
Notifications
You must be signed in to change notification settings - Fork 0
/
fbit_config.go
52 lines (44 loc) · 1.83 KB
/
fbit_config.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package types
import "time"
// FluentBitPluginKind enum with known fluent-bit plugin types.
type FluentBitPluginKind string
const (
FluentBitPluginKindInput FluentBitPluginKind = "input"
FluentBitPluginKindFilter FluentBitPluginKind = "filter"
FluentBitPluginKindOutput FluentBitPluginKind = "output"
)
// FluentBitPluginConfig model represents a fluent-bit plugin that can be reused
// across pipelines on a project.
type FluentBitPluginConfig struct {
ID string `json:"id" yaml:"id"`
ProjectID string `json:"projectID" yaml:"projectID"`
Kind FluentBitPluginKind `json:"kind" yaml:"kind"`
Name string `json:"name" yaml:"name"`
Properties map[string]interface{} `json:"properties" yaml:"properties"`
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt"`
}
// CreateFluentBitPluginConfig request payload for creating a new
// fluent-bit plugin config on a project.
type CreateFluentBitPluginConfig struct {
Kind FluentBitPluginKind `json:"kind"`
Name string `json:"name"`
Properties map[string]interface{} `json:"properties"`
}
// CreatedFluentBitPluginConfig response payload after creating
// a fluent-bit plugin config successfully.
type CreatedFluentBitPluginConfig struct {
ID string `json:"id" yaml:"id"`
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
}
// FluentBitPluginConfigsParams request payload for querying
// the fluent-bit plugin configs.
type FluentBitPluginConfigsParams struct {
Last *uint
Before *string
}
// FluentBitPluginConfigs paginated list.
type FluentBitPluginConfigs struct {
Items []FluentBitPluginConfig `json:"items" yaml:"items"`
EndCursor *string `json:"endCursor" yaml:"endCursor"`
}