bolt

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LockersKey          = "lockers"
	RecordsKey          = "records"
	RecordLookupKey     = "record_lookup"
	ResourceLookupKey   = "resource_lookup"
	ImpressionLookupKey = "impression_lookup"
	VariantsKey         = "variants"
	AssetLookupKey      = "asset_lookup"
	PropertiesKey       = "properties"
	ControlsKey         = "controls"

	GenesisBlockHashKey = "genesis_block_hash"

	AccessLevelKey = "access_level"
	AccountKey     = "account"
)
View Source
const (
	Type = "bolt"

	ParameterFilePath = "file_path"

	Algorithm = "metalocker:root:1"
)

Variables

This section is empty.

Functions

func InstallIndexSchema

func InstallIndexSchema(bc *utils.BoltClient, userID string) error

func InstallIndexStoreSchema

func InstallIndexStoreSchema(bc *utils.BoltClient) error

func NewIndexStore

func NewIndexStore(cfg *index.StoreConfig, resolver cmdbase.ParameterResolver) (index.Store, error)

Types

type Index

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

func (*Index) AddLease

func (dwi *Index) AddLease(ds model.DataSet, effectiveBlockNumber int64) error

func (*Index) AddLeaseRevocation

func (dwi *Index) AddLeaseRevocation(ds model.DataSet) error

func (*Index) AddLockerState

func (dwi *Index) AddLockerState(accountID, lockerID string, firstBlock int64) error

func (*Index) Close

func (dwi *Index) Close() error

func (*Index) GetRecord

func (dwi *Index) GetRecord(recordID string) (*index.RecordState, error)

func (*Index) GetRecordsByImpressionID

func (dwi *Index) GetRecordsByImpressionID(impID string, lockerFilter map[string]bool) ([]string, error)

func (*Index) GetRecordsByResourceID

func (dwi *Index) GetRecordsByResourceID(resourceID string, lockerFilter map[string]bool) ([]string, error)

func (*Index) GetVariant

func (dwi *Index) GetVariant(variantID string, includeHistory bool) (*index.VariantRecordState,
	[]*index.VariantRecordState, error)

func (*Index) ID

func (dwi *Index) ID() string

func (*Index) IsLocked

func (dwi *Index) IsLocked() bool

func (*Index) IsWritable

func (dwi *Index) IsWritable() bool

func (*Index) Lock

func (dwi *Index) Lock()

func (*Index) LockerStates

func (dwi *Index) LockerStates() ([]index.LockerState, error)

func (*Index) Properties

func (dwi *Index) Properties() *index.Properties

func (*Index) TraverseAssetRecords

func (dwi *Index) TraverseAssetRecords(assetID string, vFunc index.AssetRecordVisitor, maxRecords uint64) error

func (*Index) TraverseRecords

func (dwi *Index) TraverseRecords(lockerFilter, participantFilter string, vFunc index.RecordVisitor, maxRecords uint64) error

func (*Index) TraverseVariants

func (dwi *Index) TraverseVariants(lockerFilter, participantFilter string, vFunc index.VariantVisitor, includeHistory bool, maxVariants uint64) error

func (*Index) Unlock

func (dwi *Index) Unlock(key []byte) error

func (*Index) UpdateTopBlock

func (dwi *Index) UpdateTopBlock(blockNumber int64) error

func (*Index) Writer

func (dwi *Index) Writer() (index.Writer, error)

type IndexStore

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

func (*IndexStore) Bind

func (s *IndexStore) Bind(gbHash string) error

func (*IndexStore) Close

func (s *IndexStore) Close() error

func (*IndexStore) CreateIndex

func (s *IndexStore) CreateIndex(userID string, indexType string, accessLevel model.AccessLevel, opts ...index.Option) (index.Index, error)

func (*IndexStore) DeleteIndex

func (s *IndexStore) DeleteIndex(userID, id string) error

func (*IndexStore) GenesisBlockHash

func (s *IndexStore) GenesisBlockHash() string

func (*IndexStore) ID

func (s *IndexStore) ID() string

func (*IndexStore) Index

func (s *IndexStore) Index(userID string, id string) (index.Index, error)

func (*IndexStore) ListIndexes

func (s *IndexStore) ListIndexes(userID string) ([]*index.Properties, error)

func (*IndexStore) Name

func (s *IndexStore) Name() string

func (*IndexStore) Properties

func (s *IndexStore) Properties() *index.StoreProperties

func (*IndexStore) RootIndex

func (s *IndexStore) RootIndex(userID string, lvl model.AccessLevel) (index.RootIndex, error)

Jump to

Keyboard shortcuts

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