Help us shape the future of Go! Take the 2026 Go Developer Survey

ld

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a JSON-LD SDK client.

func NewClient

func NewClient(ctx provider, opts ...Option) *Client

NewClient returns a new instance of Client.

func (*Client) AddContexts

func (c *Client) AddContexts(documents []ldcontext.Document) error

AddContexts adds JSON-LD contexts to the underlying storage.

func (*Client) AddRemoteProvider

func (c *Client) AddRemoteProvider(providerEndpoint string, opts ...remote.ProviderOpt) (string, error)

AddRemoteProvider adds remote provider and JSON-LD contexts from that provider.

func (*Client) DeleteRemoteProvider

func (c *Client) DeleteRemoteProvider(providerID string, opts ...remote.ProviderOpt) error

DeleteRemoteProvider deletes remote provider and contexts from that provider.

func (*Client) GetAllRemoteProviders

func (c *Client) GetAllRemoteProviders() ([]ldstore.RemoteProviderRecord, error)

GetAllRemoteProviders gets all remote providers.

func (*Client) RefreshAllRemoteProviders

func (c *Client) RefreshAllRemoteProviders(opts ...remote.ProviderOpt) error

RefreshAllRemoteProviders updates contexts from all remote providers.

func (*Client) RefreshRemoteProvider

func (c *Client) RefreshRemoteProvider(providerID string, opts ...remote.ProviderOpt) error

RefreshRemoteProvider updates contexts from the remote provider.

type Option

type Option func(c *Client)

Option configures the JSON-LD client.

func WithLDService

func WithLDService(svc ld.Service) Option

WithLDService sets the custom JSON-LD service.

Jump to

Keyboard shortcuts

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