config

package
v0.9.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package config [used for configuring the package]

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = ``

DefaultConfig is the config embedded into the app that it will use if not able to fetch any other config

Functions

func NewUpdaterOptionsWithFlags

func NewUpdaterOptionsWithFlags() (updaterMode *bool, destinationPath *string)

NewUpdaterOptionsWithFlags returns updater options initialized with command line flags.

func UpdateLocal

func UpdateLocal(logger *zap.Logger, destinationPath string, configPaths []string, backupConfig []byte, skipEncrypted bool)

Types

type Args

type Args = map[string]any

Args is a generic arguments map.

type Config

type Config struct {
	Name   string
	Type   string
	Count  int
	Filter string
	Args   Args
}

Config for a single job.

type MultiConfig

type MultiConfig struct {
	Jobs []Config
}

MultiConfig for all jobs.

func Unmarshal

func Unmarshal(body []byte, format string) *MultiConfig

Unmarshal config encoded with the given format.

type RawMultiConfig

type RawMultiConfig struct {
	Body      []byte
	Protected bool
	// contains filtered or unexported fields
}

func FetchRawMultiConfig

func FetchRawMultiConfig(ctx context.Context, logger *zap.Logger, paths []string, lastKnownConfig *RawMultiConfig, skipEncrypted bool) *RawMultiConfig

FetchRawMultiConfig retrieves the current config using a list of paths. Falls back to the last known config in case of errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL