Documentation
¶
Overview ¶
Package application run the application
Package application run the application ¶
Package application run the application ¶
Package application run the application ¶
Package application run the application
Index ¶
- func ParseData(data []byte) (interface{}, error)
- func PrintTable(spec *Spec, fullData interface{}) error
- func ReadData(dataFilePath string) ([]byte, error)
- func ReadParseData(dataFilePath string) (interface{}, error)
- func ReadSpec(specFile string) ([]byte, error)
- func Run(args []string) error
- func ValidateDataFile(args []string) (string, error)
- func ValidateSpec(spec *Spec) error
- func ValidateSpecFile(specFile string) string
- type Arguments
- type Column
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintTable ¶
PrintTable prints JSON data in tabular format based on the provided specification
func ReadParseData ¶
ReadParseData reads a data file and parses it into an interface{}
func ValidateDataFile ¶
ValidateDataFile validates the data file argument, ensuring that either a single file is provided or data is piped to stdin
func ValidateSpec ¶
ValidateSpec validates that the spec meets minimum requirements
func ValidateSpecFile ¶
ValidateSpecFile validates the spec file option
Types ¶
type Column ¶
type Column struct {
Path string `json:"path" validate:"required"`
Title string `json:"title"`
MinWidth int `json:"minWidth" validate:"min=0,ltefield=MaxWidth"`
MaxWidth int `json:"maxWidth" validate:"min=0,gtefield=MinWidth"`
Width int
}
Column represents a column specification
Click to show internal directories.
Click to hide internal directories.