loader

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

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

func New

func New(opts *ParseOptions) *Loader

func (*Loader) LoadAll

func (l *Loader) LoadAll(filePaths []string) ([]*jsonschema.Schema, error)

func (*Loader) LoadFile

func (l *Loader) LoadFile(filePath string) (*jsonschema.Schema, error)

LoadFile loads a JSON schema from filePath if rootDir is not empty, schema uri is relative to rootDir if baseUri is not empty, schema uri will be resolved against baseUri

func (*Loader) LoadStdin

func (l *Loader) LoadStdin() (*jsonschema.Schema, error)

func (*Loader) ParseFileURI

func (l *Loader) ParseFileURI(file string) (*url.URL, error)

type ParseOptions

type ParseOptions struct {
	RootDir string
	BaseURI string
}

Jump to

Keyboard shortcuts

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