config

package
v0.0.0-...-f21fe5e Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForMode

func AskForMode() (string, error)

AskForMode prompts the user to select between starting the HTTP server or using the CLI

func LoadConfig

func LoadConfig(configFile string) (map[string]interface{}, error)

LoadConfig attempts to read the configuration from a file

func SetupConfigInteractively

func SetupConfigInteractively() (map[string]interface{}, error)

SetupConfigInteractively prompts the user to set up input and output methods interactively, including all required fields for the selected integrations.

Types

type Config

type Config struct {
	InputMethod     string                 `yaml:"inputMethod"`
	OutputMethod    string                 `yaml:"outputMethod"`
	InputConfig     map[string]interface{} `yaml:"inputconfig"`
	OutputConfig    map[string]interface{} `yaml:"outputconfig"`
	Validations     []string               `yaml:"validations"`
	Transformations []string               `yaml:"transformations"`
	ErrorHandling   ErrorHandling          `yaml:"errorhandling"`
}

Config represents the entire configuration structure

type ErrorHandling

type ErrorHandling struct {
	Strategy         string           `yaml:"strategy"`
	QuarantineOutput QuarantineOutput `yaml:"quarantineoutput"`
}

ErrorHandling represents the error handling configuration

type QuarantineOutput

type QuarantineOutput struct {
	Type     string `yaml:"type"`
	Location string `yaml:"location"`
}

QuarantineOutput represents the quarantine output configuration

Jump to

Keyboard shortcuts

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