Documentation ¶
Index ¶
- func NewLocalStorage(ctx context.Context, path string) (linker.Storage, error)
- type Local
- func (l *Local) Documents(ctx context.Context) (map[string]*document.Document, error)
- func (l *Local) InsertDocument(ctx context.Context, doc *document.Document)
- func (l *Local) InsertLink(ctx context.Context, link *linker.Edge)
- func (l *Local) InsertSegment(ctx context.Context, seg *linker.Segment)
- func (l *Local) Links(ctx context.Context) (map[string]*linker.Edge, error)
- func (l *Local) Metadata(ctx context.Context) (*linker.Metadata, error)
- func (l *Local) Segments(ctx context.Context) (map[string]*linker.Segment, error)
- func (l *Local) SetMetadata(ctx context.Context, meta *linker.Metadata)
- type LocalManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Local ¶
Local wraps around boltdb and stow to persist linker data
func (*Local) Documents ¶
Documents takes all documents currently stored in stow and returns them as hash map
func (*Local) InsertDocument ¶
InsertDocument into stow by its hash
func (*Local) InsertLink ¶
InsertLink into stow by its hash
func (*Local) InsertSegment ¶
InsertSegment into stow by its hash
type LocalManager ¶
type LocalManager struct {
// contains filtered or unexported fields
}
LocalManager provides helpers for managing a local storage collection
func NewLocalManager ¶
func NewLocalManager(ctx context.Context, root string) *LocalManager
NewLocalManager with root path
Click to show internal directories.
Click to hide internal directories.