coreindex

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecomposeRepoSetKey

func DecomposeRepoSetKey(k string) (rtype, rkind, rname string, err error)

DecomposeRepoSetKey - decompose a giver datastore key to constituent parts

func GetDocKey

func GetDocKey(rc string, rn string, ri int64, di int64) (ds.Key, error)

GetDocKey - return a datastore key for a corpus document

func GetRepoSetKey

func GetRepoSetKey(t, k, n string) (ds.Key, error)

GetRepoSetKey - return a datastore key for a reposet

func InitIndexKVStore

func InitIndexKVStore(d ds.Datastore)

InitIndexKVStore call to change datastore to use

Types

type CorpusProps

type CorpusProps interface {
	GetRclass() string
	GetRkind() string
	GetRindex() int64
	GetRcid() *cid.Cid

	SetRclass(rc string)
	SetRkind(rk string)
	SetRindex(ri int64)
	SetRcid(id *cid.Cid)

	Equals(o CorpusProps) bool

	Marshal() ([]byte, error)
	Unmarshal(b []byte) error
}

Corpus provides an abstraction for corpus document cid tracking.

func NewCorpusProps

func NewCorpusProps(rc string, rk string, ri int64, id *cid.Cid) CorpusProps

type KVStore

type KVStore interface {
	ds.Datastore
}

KVStore Datastore interface

func GetIndexKVStore

func GetIndexKVStore() KVStore

GetIndexKVStore return key-value store

type Rps

type Rps interface {
	GetCid() *cid.Cid

	SetCid(v *cid.Cid)

	Equals(o Rps) bool

	Marshal() ([]byte, error)
	Unmarshal(b []byte) error
}

func NewRps

func NewRps() Rps

Jump to

Keyboard shortcuts

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