loaders

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0, MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorCIDEEmpty = errors.New("CID is empty")

ErrorCIDEEmpty is for error when CID is empty

View Source
var ErrorURLEmpty = errors.New("URL is empty")

ErrorURLEmpty is empty url error

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	URL string
}

HTTP is loader for http / https schemas

func (HTTP) Load

func (l HTTP) Load(ctx context.Context) (schema []byte, extension string, err error)

Load loads schema by url

type IPFS added in v0.0.16

type IPFS struct {
	URL string
	CID string
}

IPFS loader for fetching schema

func (IPFS) Load added in v0.0.16

func (l IPFS) Load(ctx context.Context) (schema []byte, extension string, err error)

Load method IPFS implementation

type Loader

type Loader interface {
	Load(ctx context.Context) (schema []byte, extension string, err error)
}

Loader is basic interface for loaders

Jump to

Keyboard shortcuts

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