validation

package
v0.0.0-...-66da4ae Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJSON

func ToJSON(errorList []gojsonschema.ResultError) ([]byte, error)

func ValidateGoStruct

func ValidateGoStruct(schemaPath string, data interface{}) ([]gojsonschema.ResultError, error)

func ValidateJsonString

func ValidateJsonString(schemaPath string, data []byte) ([]gojsonschema.ResultError, error)

Types

type ValidationError

type ValidationError struct {
	Parameter string      `json:"parameter"`
	Error     string      `json:"error"`
	Value     interface{} `json:"value"`
	Field     string      `json:"field"`
}

Jump to

Keyboard shortcuts

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