-
Notifications
You must be signed in to change notification settings - Fork 11
/
configuration.go
40 lines (28 loc) · 1.52 KB
/
configuration.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
package internal
import (
s2hv1 "github.com/agoda-com/samsahai/api/v1"
)
type ConfigController interface {
// Get returns configuration from memory
Get(configName string) (*s2hv1.Config, error)
// GetComponents returns all components from `Configuration` that has valid `Source`
GetComponents(configName string) (map[string]*s2hv1.Component, error)
// GetParentComponents returns components that doesn't have parent (nil Parent)
GetParentComponents(configName string) (map[string]*s2hv1.Component, error)
// GetPullRequestComponents returns all pull request components from `Configuration` that has valid `Source`
GetPullRequestComponents(configName string) (map[string]*s2hv1.Component, error)
// GetBundles returns a group of components for each bundle
GetBundles(configName string) (s2hv1.ConfigBundles, error)
// GetPriorityQueues returns a list of priority queues which defined in Config
GetPriorityQueues(configName string) ([]string, error)
// GetPullRequestConfig returns a configuration of pull request
GetPullRequestConfig(configName string) (*s2hv1.ConfigPullRequest, error)
// GetPullRequestComponentDependencies returns a pull request component dependencies from configuration
GetPullRequestComponentDependencies(configName, prCompName string) ([]string, error)
// Update updates Config CRD
Update(config *s2hv1.Config) error
// Delete deletes Config CRD
Delete(configName string) error
//EnsureConfigTemplateChanged updates config if template changed
EnsureConfigTemplateChanged(config *s2hv1.Config) error
}