Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
func Download(client client.SettingsClient, schemaIDs []string, projectName string) v2.ConfigsPerType
func DownloadAll ¶
func DownloadAll(client client.SettingsClient, projectName string) v2.ConfigsPerType
DownloadAll downloads all settings 2.0 objects for a given project
func WithFilters ¶
func WithFilters(filters Filters) func(*Downloader)
WithFilters sets specific settings filters for settings 2.0 object that needs to be filtered following to some custom criteria
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader is responsible for downloading Settings 2.0 objects
func NewSettingsDownloader ¶
func NewSettingsDownloader(client client.SettingsClient, opts ...func(*Downloader)) *Downloader
NewSettingsDownloader creates a new downloader for Settings 2.0 objects
func (*Downloader) Download ¶
func (d *Downloader) Download(schemaIDs []string, projectName string) v2.ConfigsPerType
Download downloads all settings 2.0 objects for the given schema IDs and a given project The returned value is a map of settings 2.0 objects with the schema ID as keys
func (*Downloader) DownloadAll ¶
func (d *Downloader) DownloadAll(projectName string) v2.ConfigsPerType
DownloadAll downloads all settings 2.0 objects for a given project. The returned value is a map of settings 2.0 objects with the schema ID as keys
type Filter ¶
type Filter struct {
// ShouldDiscard contains logic whether a settings object should be discarded
// based on specific criteria on the settings value payload. It returns true or false
// depending on the specific implementation and a reason that gives more context to the
// evaluation result, e.g. a filter that discards settings that contain a field "foo"
// with a value "bar" in their payload would be implemented like:
// func (json map[string]interface{}) (bool, string) { return json["foo"] == "bar", "foo is set to bar" }
ShouldDiscard func(map[string]interface{}) (discard bool, reason string)
}
Filter can be used to filter/discard settings 2.0