regex

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func FromFile

func FromFile(f *fs.File) *Schema

FromFile creates a Regex schema from file.

func New

func New(name string, content []byte) *Schema

New creates a Regex schema with specified name and content.

func (*Schema) AddRule

func (*Schema) AddRule(string, jschema.Rule) error

func (*Schema) AddType

func (*Schema) AddType(string, jschema.Schema) error

func (*Schema) Check

func (s *Schema) Check() error

func (*Schema) Example

func (s *Schema) Example() ([]byte, error)

func (*Schema) GetAST

func (s *Schema) GetAST() (jschema.ASTNode, error)

func (*Schema) Len

func (s *Schema) Len() (uint, error)

func (*Schema) Pattern

func (s *Schema) Pattern() (string, error)

func (*Schema) UsedUserTypes

func (*Schema) UsedUserTypes() ([]string, error)

func (*Schema) Validate

func (*Schema) Validate(jschema.Document) error

Jump to

Keyboard shortcuts

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