Documentation ¶
Overview ¶
The root file contains common helper functions used by other commands. Major commands can be in seperate files for ease of readability.
Index ¶
- Variables
- func LoadConfigFromFile(config *gatecheck.Config, filename string) error
- func LoadConfigFromFileOrReader(config *gatecheck.Config, filename string, src io.Reader, filetype string) error
- func LoadConfigFromReader(config *gatecheck.Config, src io.Reader, filetype string) error
- func NewGatecheckCommand() *cobra.Command
- func ParsedOutput(output string) (format, filename string)
- func WriteConfigInfo(w io.Writer, v *viper.Viper, config *gatecheck.Config) error
Constants ¶
This section is empty.
Variables ¶
var ( ApplicationMetadata gatecheck.ApplicationMetadata LogLeveler *slog.LevelVar = &slog.LevelVar{} )
Functions ¶
func LoadConfigFromFile ¶
LoadConfigFromFile loads config object with values after reading the file
func LoadConfigFromFileOrReader ¶
func LoadConfigFromFileOrReader(config *gatecheck.Config, filename string, src io.Reader, filetype string) error
LoadConfigFromFileOrReader will either load the config object with values after opening file or reading in from src
Either a filename or a src and filetype must be defined or this function will error
func LoadConfigFromReader ¶
LoadConfigFromReader loads config object with values from src. filetype is mandatory
func NewGatecheckCommand ¶
NewGatecheckCommand the root for all CLI commands
func ParsedOutput ¶
ParsedOutput splits the format and filename
expects the `--output` argument in the <format>=<filename> format
Types ¶
This section is empty.