Documentation ¶
Index ¶
- type DefaultService
- func (s *DefaultService) AddContexts(documents []ldcontext.Document) error
- func (s *DefaultService) AddRemoteProvider(providerEndpoint string, opts ...remote.ProviderOpt) (string, error)
- func (s *DefaultService) DeleteRemoteProvider(providerID string, opts ...remote.ProviderOpt) error
- func (s *DefaultService) GetAllRemoteProviders() ([]ld.RemoteProviderRecord, error)
- func (s *DefaultService) RefreshAllRemoteProviders(opts ...remote.ProviderOpt) error
- func (s *DefaultService) RefreshRemoteProvider(providerID string, opts ...remote.ProviderOpt) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultService ¶
type DefaultService struct {
// contains filtered or unexported fields
}
DefaultService is a default implementation of Service.
func New ¶
func New(ctx provider) *DefaultService
New returns a new default JSON-LD service instance.
func (*DefaultService) AddContexts ¶
func (s *DefaultService) AddContexts(documents []ldcontext.Document) error
AddContexts adds JSON-LD contexts to the underlying storage.
func (*DefaultService) AddRemoteProvider ¶
func (s *DefaultService) AddRemoteProvider(providerEndpoint string, opts ...remote.ProviderOpt) (string, error)
AddRemoteProvider adds remote provider and JSON-LD contexts from that provider.
func (*DefaultService) DeleteRemoteProvider ¶
func (s *DefaultService) DeleteRemoteProvider(providerID string, opts ...remote.ProviderOpt) error
DeleteRemoteProvider deletes remote provider and contexts from that provider.
func (*DefaultService) GetAllRemoteProviders ¶
func (s *DefaultService) GetAllRemoteProviders() ([]ld.RemoteProviderRecord, error)
GetAllRemoteProviders gets all remote providers.
func (*DefaultService) RefreshAllRemoteProviders ¶
func (s *DefaultService) RefreshAllRemoteProviders(opts ...remote.ProviderOpt) error
RefreshAllRemoteProviders updates contexts from all remote providers.
func (*DefaultService) RefreshRemoteProvider ¶
func (s *DefaultService) RefreshRemoteProvider(providerID string, opts ...remote.ProviderOpt) error
RefreshRemoteProvider updates contexts from the remote provider.
type Service ¶
type Service interface { AddContexts(documents []ldcontext.Document) error AddRemoteProvider(providerEndpoint string, opts ...remote.ProviderOpt) (string, error) RefreshRemoteProvider(providerID string, opts ...remote.ProviderOpt) error DeleteRemoteProvider(providerID string, opts ...remote.ProviderOpt) error GetAllRemoteProviders() ([]ld.RemoteProviderRecord, error) RefreshAllRemoteProviders(opts ...remote.ProviderOpt) error }
Service is a service that supports JSON-LD operations.
Click to show internal directories.
Click to hide internal directories.