Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 NewDownloader ¶
func NewDownloader(client dtclient.SettingsClient, opts ...func(*Downloader)) *Downloader
NewDownloader creates a new downloader for Settings 2.0 objects
func (*Downloader) Download ¶
func (d *Downloader) Download(projectName string, schemaIDs ...config.SettingsType) (v2.ConfigsPerType, error)
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
Click to show internal directories.
Click to hide internal directories.