Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CsvValidator ¶ added in v1.5.0
type CsvValidator struct{}
CsvValidator is used to validate a byte slice that is intended to represent a CSV file.
func (CsvValidator) Validate ¶ added in v1.5.0
func (csvv CsvValidator) Validate(b []byte) (bool, error)
Validate checks if the provided byte slice represents a valid .csv file. https://pkg.go.dev/encoding/csv
type EnvValidator ¶ added in v1.6.0
type EnvValidator struct{}
type HclValidator ¶ added in v1.5.0
type HclValidator struct{}
HclValidator is used to validate a byte slice that is intended to represent a HashiCorp Configuration Language (HCL) file.
func (HclValidator) Validate ¶ added in v1.5.0
func (hclv HclValidator) Validate(b []byte) (bool, error)
Validate checks if the provided byte slice represents a valid .hcl file.
The hcl parser uses FIFO to determine which error to display to the user. For more information, see the documentation at:
https://pkg.go.dev/github.com/hashicorp/hcl/v2#Diagnostics.Error
If the hcl.Diagnostics slice contains more than one error, the wrapped error returned by this function will include them as "and {count} other diagnostic(s)" in the error message.
type HoconValidator ¶ added in v1.6.0
type HoconValidator struct{}
HoconValidator is used to validate a byte slice that is intended to represent a HOCON file.
type IniValidator ¶ added in v1.3.0
type IniValidator struct{}
type JsonValidator ¶
type JsonValidator struct{}
type PlistValidator ¶ added in v1.5.0
type PlistValidator struct{}
PlistValidator is used to validate a byte slice that is intended to represent a Apple Property List file (plist).
type PropValidator ¶ added in v1.5.0
type PropValidator struct{}
type TomlValidator ¶ added in v1.1.0
type TomlValidator struct{}
type Validator ¶
Validate accepts a byte array of a file or string to be validated and returns true or false if the content of the byte array is valid or not. If it is not valid, the error return value will be populated.
type XmlValidator ¶
type XmlValidator struct{}
type YamlValidator ¶
type YamlValidator struct{}