storage

package
v0.0.0-...-a5ce5ae Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFSStorage

type IPFSStorage struct {
	Close func() error
	// contains filtered or unexported fields
}

func NewIPFSStorage

func NewIPFSStorage(ctx context.Context, id config.Identity, repo string) (*IPFSStorage, error)

func (*IPFSStorage) AllTx

func (s *IPFSStorage) AllTx(ctx context.Context, b *storage.Block) (map[tx.TxID]*tx.Tx, error)

func (*IPFSStorage) ApplyGenesis

func (s *IPFSStorage) ApplyGenesis(g *storage.GenesisInfo) error

func (*IPFSStorage) ApplyTx

func (s *IPFSStorage) ApplyTx(ctx context.Context, id tx.TxID, t *tx.Tx) (err error)

func (*IPFSStorage) Claims

func (s *IPFSStorage) Claims(ctx context.Context, did string) ([]*tx.Tx, error)

func (*IPFSStorage) CompleteTest

func (s *IPFSStorage) CompleteTest(ctx context.Context) error

func (*IPFSStorage) DIDHistory

func (s *IPFSStorage) DIDHistory(ctx context.Context, id string) ([]*tx.Tx, error)

func (*IPFSStorage) GetBlock

func (s *IPFSStorage) GetBlock(ctx context.Context, id storage.BlockID) (*storage.Block, error)

func (*IPFSStorage) GetLastApplied

func (s *IPFSStorage) GetLastApplied(ctx context.Context) (*storage.Block, error)

func (*IPFSStorage) GetSet

func (s *IPFSStorage) GetSet(ctx context.Context, id cid.Cid) (*storage.TxSet, error)

func (*IPFSStorage) GetTx

func (s *IPFSStorage) GetTx(ctx context.Context, id tx.TxID) (*tx.Tx, error)

func (*IPFSStorage) GetTxBlock

func (s *IPFSStorage) GetTxBlock(ctx context.Context, id tx.TxID) (*storage.Block, error)

func (*IPFSStorage) HasGenesisApplied

func (s *IPFSStorage) HasGenesisApplied() bool

func (*IPFSStorage) LookupDID

func (s *IPFSStorage) LookupDID(ctx context.Context, did string) (*w3cdid.Document, error)

func (*IPFSStorage) MarkBlock

func (s *IPFSStorage) MarkBlock(ctx context.Context, id storage.BlockID, state storage.BlockState) error

func (*IPFSStorage) Node

func (s *IPFSStorage) Node(ctx context.Context, id string) (*tx.Node, error)

func (*IPFSStorage) Nodes

func (s *IPFSStorage) Nodes() ([]string, error)

func (*IPFSStorage) PutBlock

func (s *IPFSStorage) PutBlock(ctx context.Context, b *storage.Block) (cid.Cid, error)

func (*IPFSStorage) PutSet

func (s *IPFSStorage) PutSet(ctx context.Context, txs *storage.TxSet) (cid.Cid, error)

func (*IPFSStorage) PutTx

func (s *IPFSStorage) PutTx(ctx context.Context, transaction *tx.Tx) (cid.Cid, error)

func (*IPFSStorage) StartTest

func (s *IPFSStorage) StartTest(ctx context.Context) (storage.Store, error)

func (*IPFSStorage) Stop

func (s *IPFSStorage) Stop() error

func (*IPFSStorage) UpdateLastApplied

func (s *IPFSStorage) UpdateLastApplied(ctx context.Context, id storage.BlockID) error

type Identity

type Identity struct {
}

type Metadata

type Metadata struct {
	Identities []Identity `yaml:"id"`
}

Jump to

Keyboard shortcuts

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