Back to godoc.org

Package basestore

v1.10.10
Latest Go to latest

The latest major version is .

Published: 4 days ago | License: Apache-2.0 | Module: berty.tech/go-orbit-db

Overview

basestore defines a set of operations common to the different store types

Index

func NewBaseIndex

func NewBaseIndex(publicKey []byte) iface.StoreIndex

NewBaseIndex Creates a new basic index

func SaveSnapshot

func SaveSnapshot(ctx context.Context, b iface.Store) (cid.Cid, error)

type BaseStore

type BaseStore struct {
	events.EventEmitter
	// contains filtered or unexported fields
}

BaseStore The base of other stores

func (*BaseStore) AccessController

func (b *BaseStore) AccessController() accesscontroller.Interface

func (*BaseStore) AddOperation

func (b *BaseStore) AddOperation(ctx context.Context, op operation.Operation, onProgressCallback chan<- ipfslog.Entry) (ipfslog.Entry, error)

func (*BaseStore) Address

func (b *BaseStore) Address() address.Address

func (*BaseStore) Cache

func (b *BaseStore) Cache() datastore.Datastore

func (*BaseStore) Close

func (b *BaseStore) Close() error

func (*BaseStore) DBName

func (b *BaseStore) DBName() string

func (*BaseStore) Drop

func (b *BaseStore) Drop() error

func (*BaseStore) IPFS

func (b *BaseStore) IPFS() coreapi.CoreAPI

func (*BaseStore) Identity

func (b *BaseStore) Identity() *identityprovider.Identity

func (*BaseStore) Index

func (b *BaseStore) Index() iface.StoreIndex

func (*BaseStore) InitBaseStore

func (b *BaseStore) InitBaseStore(ctx context.Context, ipfs coreapi.CoreAPI, identity *identityprovider.Identity, addr address.Address, options *iface.NewStoreOptions) error

InitBaseStore Initializes the store base

func (*BaseStore) Load

func (b *BaseStore) Load(ctx context.Context, amount int) error

func (*BaseStore) LoadFromSnapshot

func (b *BaseStore) LoadFromSnapshot(ctx context.Context) error

func (*BaseStore) LoadMoreFrom

func (b *BaseStore) LoadMoreFrom(ctx context.Context, amount uint, cids []cid.Cid)

func (*BaseStore) Logger

func (b *BaseStore) Logger() *zap.Logger

func (*BaseStore) OpLog

func (b *BaseStore) OpLog() ipfslog.Log

func (*BaseStore) ReplicationStatus

func (b *BaseStore) ReplicationStatus() replicator.ReplicationInfo

func (*BaseStore) Replicator

func (b *BaseStore) Replicator() replicator.Replicator

func (*BaseStore) SortFn

func (b *BaseStore) SortFn() ipfslog.SortFn

func (*BaseStore) Sync

func (b *BaseStore) Sync(ctx context.Context, heads []ipfslog.Entry) error

func (*BaseStore) Tracer

func (b *BaseStore) Tracer() trace.Tracer

func (*BaseStore) Type

func (b *BaseStore) Type() string

type CanAppendContext

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

func (*CanAppendContext) GetLogEntries

func (c *CanAppendContext) GetLogEntries() []logac.LogEntry

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier