generic

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(ctx context.Context, sp view2.ServiceProvider, config *config2.Config, name string) (*network, error)

func NewNetwork

func NewNetwork(ctx context.Context, sp view2.ServiceProvider, config *config2.Config, name string) (*network, error)

Types

type DataTx

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

func (*DataTx) AddMustSignUser

func (d *DataTx) AddMustSignUser(userID string)

func (*DataTx) Commit

func (d *DataTx) Commit(sync bool) (string, error)

func (*DataTx) Delete

func (d *DataTx) Delete(db string, key string) error

func (*DataTx) Get

func (d *DataTx) Get(db string, key string) ([]byte, error)

func (*DataTx) Put

func (d *DataTx) Put(db string, key string, bytes []byte, a driver.AccessControl) error

func (*DataTx) SignAndClose

func (d *DataTx) SignAndClose() ([]byte, error)

type IdentityManager

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

func (*IdentityManager) Identity

func (i *IdentityManager) Identity(id string) *driver.Identity

func (*IdentityManager) Me

func (i *IdentityManager) Me() string

type LoadedDataTx

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

func (*LoadedDataTx) CoSignAndClose

func (l *LoadedDataTx) CoSignAndClose() ([]byte, error)

func (*LoadedDataTx) Commit

func (l *LoadedDataTx) Commit() error

func (*LoadedDataTx) ID

func (l *LoadedDataTx) ID() string

func (*LoadedDataTx) MustSignUsers

func (l *LoadedDataTx) MustSignUsers() []string

func (*LoadedDataTx) Reads

func (l *LoadedDataTx) Reads() map[string][]*driver.DataRead

func (*LoadedDataTx) SignedUsers

func (l *LoadedDataTx) SignedUsers() []string

func (*LoadedDataTx) Writes

func (l *LoadedDataTx) Writes() map[string][]*driver.DataWrite

type Network

type Network interface {
	TransactionManager() driver.TransactionManager
	EnvelopeService() driver.EnvelopeService
}

type Query

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

func (*Query) GetDataByRange

func (q *Query) GetDataByRange(dbName, startKey, endKey string, limit uint64) (driver.QueryIterator, error)

type QueryIterator

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

func (*QueryIterator) Next

func (q *QueryIterator) Next() (string, []byte, uint64, uint64, bool, error)

type Session

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

func (*Session) DataTx

func (s *Session) DataTx(txID string) (driver.DataTx, error)

func (*Session) Ledger

func (s *Session) Ledger() (driver.Ledger, error)

func (*Session) LoadDataTx

func (s *Session) LoadDataTx(envBoxed interface{}) (driver.LoadedDataTx, error)

func (*Session) Query

func (s *Session) Query() (driver.Query, error)

type SessionManager

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

func (*SessionManager) NewSession

func (s *SessionManager) NewSession(id string) (driver.Session, error)

type Vault

type Vault struct {
	*vault.Vault
	*vault.SimpleTXIDStore
	// contains filtered or unexported fields
}

func NewVault

func NewVault(sp view.ServiceProvider, config *config.Config, network Network, channel string) (*Vault, error)

func (*Vault) CommitTX

func (v *Vault) CommitTX(txID string, block uint64, indexInBloc int) error

func (*Vault) DiscardTx

func (v *Vault) DiscardTx(txID string) error

func (*Vault) GetLastTxID

func (v *Vault) GetLastTxID() (string, error)

func (*Vault) GetRWSet

func (v *Vault) GetRWSet(id string, results []byte) (driver.RWSet, error)

func (*Vault) NewQueryExecutor

func (v *Vault) NewQueryExecutor() (driver.QueryExecutor, error)

func (*Vault) NewRWSet

func (v *Vault) NewRWSet(txID string) (driver.RWSet, error)

func (*Vault) Status

func (v *Vault) Status(txID string) (driver.ValidationCode, error)

Directories

Path Synopsis
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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