Documentation
¶
Index ¶
- type JSONSchemaService
- type Module
- func (m *Module) Dependencies() []string
- func (m *Module) Init(modular.Application) error
- func (m *Module) Name() string
- func (m *Module) ProvidesServices() []modular.ServiceProvider
- func (m *Module) RegisterConfig(modular.Application)
- func (m *Module) RequiresServices() []modular.ServiceDependency
- func (m *Module) Start(context.Context) error
- func (m *Module) Stop(context.Context) error
- type Schema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONSchemaService ¶
type JSONSchemaService interface {
// CompileSchema compiles a JSON schema from a file path or URL
CompileSchema(source string) (Schema, error)
// ValidateBytes validates raw JSON data against a compiled schema
ValidateBytes(schema Schema, data []byte) error
// ValidateReader validates JSON from an io.Reader against a compiled schema
ValidateReader(schema Schema, reader io.Reader) error
// ValidateInterface validates a Go interface{} against a compiled schema
ValidateInterface(schema Schema, data interface{}) error
}
JSONSchemaService defines the operations that can be performed with JSON schemas
func NewJSONSchemaService ¶
func NewJSONSchemaService() JSONSchemaService
NewJSONSchemaService creates a new JSON schema service
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) Dependencies ¶
func (*Module) ProvidesServices ¶
func (m *Module) ProvidesServices() []modular.ServiceProvider
func (*Module) RegisterConfig ¶
func (m *Module) RegisterConfig(modular.Application)
func (*Module) RequiresServices ¶
func (m *Module) RequiresServices() []modular.ServiceDependency
Click to show internal directories.
Click to hide internal directories.