remote

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient represents an HTTP client.

type Provider

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

Provider is a remote JSON-LD context provider.

func NewProvider

func NewProvider(endpoint string, opts ...ProviderOpt) *Provider

NewProvider returns a new instance of the remote provider.

func (*Provider) Contexts

func (p *Provider) Contexts() ([]ldcontext.Document, error)

Contexts returns JSON-LD contexts from the remote source.

func (*Provider) Endpoint

func (p *Provider) Endpoint() string

Endpoint returns endpoint of the remote JSON-LD context source.

type ProviderOpt

type ProviderOpt func(*Provider)

ProviderOpt configures the remote context provider.

func WithHTTPClient

func WithHTTPClient(client HTTPClient) ProviderOpt

WithHTTPClient configures an HTTP client.

type Response

type Response struct {
	Documents []ldcontext.Document `json:"documents"`
}

Response represents a response from the remote source with JSON-LD context documents.

Jump to

Keyboard shortcuts

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