Documentation ¶
Index ¶
- Constants
- func ContextRemoveRootStub(c *gojsonschema.JsonContext) *gojsonschema.JsonContext
- func ContextSetRoot(c *gojsonschema.JsonContext, head string) *gojsonschema.JsonContext
- func MustNewWindowsCompatibleReferenceLoader(source string) gojsonschema.JSONLoader
- func NewDuplicateCredentialsError() error
- func NewInvalidCredentialsError() error
- func NewPasswordPolicyValidation(value interface{}, reason string, context *gojsonschema.JsonContext) error
- func NewRequiredError(value interface{}, context *gojsonschema.JsonContext) error
- func NewWindowsCompatibleReferenceLoader(source string) (_ gojsonschema.JSONLoader, err error)
- type Extension
- type Handler
- type HandlerProvider
- type ResultErrors
- type Schema
- type Schemas
- type ValidationExtender
- type ValidationProvider
- type Validator
Constants ¶
View Source
const SchemasPath string = "schemas"
Variables ¶
This section is empty.
Functions ¶
func ContextRemoveRootStub ¶
func ContextRemoveRootStub(c *gojsonschema.JsonContext) *gojsonschema.JsonContext
func ContextSetRoot ¶
func ContextSetRoot(c *gojsonschema.JsonContext, head string) *gojsonschema.JsonContext
func MustNewWindowsCompatibleReferenceLoader ¶
func MustNewWindowsCompatibleReferenceLoader(source string) gojsonschema.JSONLoader
func NewDuplicateCredentialsError ¶
func NewDuplicateCredentialsError() error
func NewInvalidCredentialsError ¶
func NewInvalidCredentialsError() error
func NewPasswordPolicyValidation ¶
func NewPasswordPolicyValidation(value interface{}, reason string, context *gojsonschema.JsonContext) error
func NewRequiredError ¶
func NewRequiredError(value interface{}, context *gojsonschema.JsonContext) error
func NewWindowsCompatibleReferenceLoader ¶
func NewWindowsCompatibleReferenceLoader(source string) (_ gojsonschema.JSONLoader, err error)
NewWindowsCompatibleReferenceLoader returns a JSON reference loader using the given source and the local OS file system.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(r handlerDependencies) *Handler
func (*Handler) RegisterPublicRoutes ¶
func (h *Handler) RegisterPublicRoutes(public *x.RouterPublic)
type HandlerProvider ¶
type HandlerProvider interface {
SchemaHandler() *Handler
}
type ResultErrors ¶
type ResultErrors []gojsonschema.ResultError
func (ResultErrors) Error ¶
func (e ResultErrors) Error() string
type ValidationExtender ¶
type ValidationExtender interface {
Call(node interface{}, extension *Extension, context *gojsonschema.JsonContext) error
}
type ValidationProvider ¶
type ValidationProvider interface {
SchemaValidator() *Validator
}
type Validator ¶
func NewValidator ¶
func NewValidator() *Validator
func (*Validator) Validate ¶
func (v *Validator) Validate( href string, object gojsonschema.JSONLoader, extensions ...ValidationExtender, ) error
Click to show internal directories.
Click to hide internal directories.