ldstore

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextStore

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

ContextStore is mongodb implementation of JSON-LD context repository.

func NewContextStore

func NewContextStore(mongoClient *mongodb.Client) (*ContextStore, error)

NewContextStore returns a new instance of ContextStore.

func (*ContextStore) Delete

func (s *ContextStore) Delete(documents []ldcontext.Document) error

Delete deletes matched context documents in the underlying storage. Documents are matched by context URL and ld.RemoteDocument content hash.

func (*ContextStore) Get

Get returns JSON-LD remote document from DB by context URL.

func (*ContextStore) Import

func (s *ContextStore) Import(documents []ldcontext.Document) error

Import imports JSON-LD contexts into DB.

func (*ContextStore) Put

Put saves JSON-LD remote document into DB.

type RemoteProviderStore

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

RemoteProviderStore is mongodb implementation of remote provider repository.

func NewRemoteProviderStore

func NewRemoteProviderStore(mongoClient *mongodb.Client) (*RemoteProviderStore, error)

NewRemoteProviderStore returns a new instance of RemoteProviderStoreImpl.

func (*RemoteProviderStore) Delete

func (s *RemoteProviderStore) Delete(id string) error

Delete deletes a remote provider record in DB.

func (*RemoteProviderStore) Get

Get returns a remote provider record from DB.

func (*RemoteProviderStore) GetAll

GetAll returns all remote provider records from DB.

func (*RemoteProviderStore) Save

Save creates a new remote provider record and saves it into DB. If record with given endpoint already exists, it is returned to the caller.

Jump to

Keyboard shortcuts

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