grapp

package
v0.0.0-...-f950530 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocumentFromReader

func DocumentFromReader(documentBody io.Reader, src string) (interface{}, error)

Types

type CachedDocument

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

func NewCachedDocument

func NewCachedDocument(r io.ReadCloser, cacheDir string, docHashType crypto.Hash) (*CachedDocument, error)

func (*CachedDocument) Close

func (d *CachedDocument) Close() error

func (*CachedDocument) Read

func (d *CachedDocument) Read(p []byte) (int, error)

type DocumentLoader

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

func NewDocumentLoader

func NewDocumentLoader(httpClient *http.Client, grappDir string, objectsDir string) *DocumentLoader

func (*DocumentLoader) LoadDocument

func (dl *DocumentLoader) LoadDocument(u string) (*ld.RemoteDocument, error)

Loads JSON-LD documents from local or http paths Implements github.com/piprate/ld/DocumentLoader interface

type FileGrapplicationResource

type FileGrapplicationResource struct {
}

func (*FileGrapplicationResource) Init

func (grapp *FileGrapplicationResource) Init(ctxt context.Context, grappDir string) error

func (*FileGrapplicationResource) Validate

func (grapp *FileGrapplicationResource) Validate(ctxt context.Context, vw io.Writer) error

Jump to

Keyboard shortcuts

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