filetype

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

An array of files types that are supported by the validator

View Source
var JsonFileType = FileType{
	"json",
	[]string{"json"},
	validator.JsonValidator{},
}

Instance of the FileType object to represent a JSON file

View Source
var TomlFileType = FileType{
	"toml",
	[]string{"toml"},
	validator.TomlValidator{},
}

Instance of FileType object to represent a Toml file

View Source
var XmlFileType = FileType{
	"xml",
	[]string{"xml"},
	validator.XmlValidator{},
}

Instance of FileType object to represent a XML file

View Source
var YamlFileType = FileType{
	"yaml",
	[]string{"yml", "yaml"},
	validator.YamlValidator{},
}

Instance of the FileType object to represent a YAML file

Functions

This section is empty.

Types

type FileType

type FileType struct {
	Name       string
	Extensions []string
	Validator  validator.Validator
}

The FileType object stores information about a file type including name, extensions, as well as an instance of the file type's validator to be able to validate the file

Jump to

Keyboard shortcuts

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