Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Properties ¶
type Properties struct { PropertyIds []string Type []string Name []string Table []string Filename []string }
Properties A helper struct which allows for easy display of validation errors
func (Properties) Exists ¶
func (p Properties) Exists(pid, name, tname, ptype, filename string) (exists bool, e ValidationError)
Exists Checks if the pid and name parameters exist
type ValidationError ¶
type ValidationError struct { Desc string Items []ValidationItem }
ValidationError Stores the details of an Error
func (ValidationError) String ¶
func (v ValidationError) String() string
type ValidationErrors ¶
type ValidationErrors struct {
Errors []ValidationError
}
func ValidatePropertyIDs ¶
func ValidatePropertyIDs(yamlSchema []table.Table, mysqlSchema []table.Table, log bool) (validationErrors ValidationErrors, err error)
ValidatePropertyIDs Compare the tables between the YAML and MySQL, and check if property ids have been changed without any change to the table and field. This would indicate a YAML data error and the user should be notified.
func ValidateSchema ¶
func ValidateSchema(tables table.Tables, schemaName string, log bool) (validationErrors ValidationErrors, err error)
ValidateSchema checks the tables parameter for duplicate names and ids. Ids and names cannot be shared between tables and the properties of individual tables
func (*ValidationErrors) Add ¶
func (ve *ValidationErrors) Add(e ValidationError)
func (ValidationErrors) Count ¶
func (ve ValidationErrors) Count() int
func (ValidationErrors) HasErrors ¶
func (ve ValidationErrors) HasErrors() bool
func (ValidationErrors) Log ¶
func (ve ValidationErrors) Log()
Click to show internal directories.
Click to hide internal directories.