idstore

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store contain couchdb instance

func OpenIDStore

func OpenIDStore(ledgerconfig *ledger.Config) (*Store, error)

OpenIDStore return id store

func (*Store) Close

func (s *Store) Close()

Close the store

func (*Store) CreateLedgerID

func (s *Store) CreateLedgerID(ledgerID string, gb *common.Block) error

CreateLedgerID create ledger id

func (*Store) GetActiveLedgerIDs added in v0.1.1

func (s *Store) GetActiveLedgerIDs() ([]string, error)

GetActiveLedgerIDs returns the active ledger IDs

func (*Store) GetFormat added in v0.1.1

func (s *Store) GetFormat() ([]byte, error)

GetFormat returns the format of the database

func (*Store) GetGenesisBlock added in v0.1.1

func (s *Store) GetGenesisBlock(ledgerID string) (*common.Block, error)

GetGenesisBlock returns the genesis block for the given ledger ID

func (*Store) GetUnderConstructionFlag

func (s *Store) GetUnderConstructionFlag() (string, error)

GetUnderConstructionFlag get under construction flag

func (*Store) LedgerIDActive added in v0.1.1

func (s *Store) LedgerIDActive(ledgerID string) (active bool, exists bool, err error)

LedgerIDActive tests whether a ledger ID exists and is active

func (*Store) LedgerIDExists

func (s *Store) LedgerIDExists(ledgerID string) (bool, error)

LedgerIDExists check ledger id exists

func (*Store) SetUnderConstructionFlag

func (s *Store) SetUnderConstructionFlag(ledgerID string) error

SetUnderConstructionFlag set under construction flag

func (*Store) UnsetUnderConstructionFlag

func (s *Store) UnsetUnderConstructionFlag() error

UnsetUnderConstructionFlag unset under construction flag

func (*Store) UpdateLedgerStatus added in v0.1.1

func (s *Store) UpdateLedgerStatus(ledgerID string, newStatus msgs.Status) error

UpdateLedgerStatus sets the status of the given ledger

func (*Store) UpgradeFormat added in v0.1.1

func (s *Store) UpgradeFormat() error

UpgradeFormat upgrades the database format

Jump to

Keyboard shortcuts

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