pvtdatastorage

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollElgInfo

type CollElgInfo struct {
	NsCollMap            map[string]*CollNames `` /* 159-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (*CollElgInfo) Descriptor

func (*CollElgInfo) Descriptor() ([]byte, []int)

func (*CollElgInfo) GetNsCollMap

func (m *CollElgInfo) GetNsCollMap() map[string]*CollNames

func (*CollElgInfo) ProtoMessage

func (*CollElgInfo) ProtoMessage()

func (*CollElgInfo) Reset

func (m *CollElgInfo) Reset()

func (*CollElgInfo) String

func (m *CollElgInfo) String() string

func (*CollElgInfo) XXX_DiscardUnknown

func (m *CollElgInfo) XXX_DiscardUnknown()

func (*CollElgInfo) XXX_Marshal

func (m *CollElgInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CollElgInfo) XXX_Merge

func (m *CollElgInfo) XXX_Merge(src proto.Message)

func (*CollElgInfo) XXX_Size

func (m *CollElgInfo) XXX_Size() int

func (*CollElgInfo) XXX_Unmarshal

func (m *CollElgInfo) XXX_Unmarshal(b []byte) error

type CollNames

type CollNames struct {
	Entries              []string `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CollNames) Descriptor

func (*CollNames) Descriptor() ([]byte, []int)

func (*CollNames) GetEntries

func (m *CollNames) GetEntries() []string

func (*CollNames) ProtoMessage

func (*CollNames) ProtoMessage()

func (*CollNames) Reset

func (m *CollNames) Reset()

func (*CollNames) String

func (m *CollNames) String() string

func (*CollNames) XXX_DiscardUnknown

func (m *CollNames) XXX_DiscardUnknown()

func (*CollNames) XXX_Marshal

func (m *CollNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CollNames) XXX_Merge

func (m *CollNames) XXX_Merge(src proto.Message)

func (*CollNames) XXX_Size

func (m *CollNames) XXX_Size() int

func (*CollNames) XXX_Unmarshal

func (m *CollNames) XXX_Unmarshal(b []byte) error

type Collections

type Collections struct {
	Map map[string]*TxNums `` /* 147-byte string literal not displayed */

	MissingDataMap       map[string]bool `` /* 170-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Collections) Descriptor

func (*Collections) Descriptor() ([]byte, []int)

func (*Collections) GetMap

func (m *Collections) GetMap() map[string]*TxNums

func (*Collections) GetMissingDataMap

func (m *Collections) GetMissingDataMap() map[string]bool

func (*Collections) ProtoMessage

func (*Collections) ProtoMessage()

func (*Collections) Reset

func (m *Collections) Reset()

func (*Collections) String

func (m *Collections) String() string

func (*Collections) XXX_DiscardUnknown

func (m *Collections) XXX_DiscardUnknown()

func (*Collections) XXX_Marshal

func (m *Collections) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Collections) XXX_Merge

func (dst *Collections) XXX_Merge(src proto.Message)

func (*Collections) XXX_Size

func (m *Collections) XXX_Size() int

func (*Collections) XXX_Unmarshal

func (m *Collections) XXX_Unmarshal(b []byte) error

type ErrIllegalArgs

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

func (*ErrIllegalArgs) Error

func (err *ErrIllegalArgs) Error() string

type ErrIllegalCall

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

func (*ErrIllegalCall) Error

func (err *ErrIllegalCall) Error() string

type ErrOutOfRange

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

func (*ErrOutOfRange) Error

func (err *ErrOutOfRange) Error() string

type ExpiryData

type ExpiryData struct {
	Map                  map[string]*Collections `` /* 147-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*ExpiryData) Descriptor

func (*ExpiryData) Descriptor() ([]byte, []int)

func (*ExpiryData) GetMap

func (m *ExpiryData) GetMap() map[string]*Collections

func (*ExpiryData) ProtoMessage

func (*ExpiryData) ProtoMessage()

func (*ExpiryData) Reset

func (m *ExpiryData) Reset()

func (*ExpiryData) String

func (m *ExpiryData) String() string

func (*ExpiryData) XXX_DiscardUnknown

func (m *ExpiryData) XXX_DiscardUnknown()

func (*ExpiryData) XXX_Marshal

func (m *ExpiryData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExpiryData) XXX_Merge

func (dst *ExpiryData) XXX_Merge(src proto.Message)

func (*ExpiryData) XXX_Size

func (m *ExpiryData) XXX_Size() int

func (*ExpiryData) XXX_Unmarshal

func (m *ExpiryData) XXX_Unmarshal(b []byte) error

type PrivateDataConfig

type PrivateDataConfig struct {
	*ledger.PrivateDataConfig

	StorePath string
}

type Provider

type Provider interface {
	OpenStore(id string) (Store, error)
	Close()
}

func NewProvider

func NewProvider(conf *PrivateDataConfig) (Provider, error)

type Store

type Store interface {
	Init(btlPolicy pvtdatapolicy.BTLPolicy)

	InitLastCommittedBlock(blockNum uint64) error

	GetPvtDataByBlockNum(blockNum uint64, filter ledger.PvtNsCollFilter) ([]*ledger.TxPvtData, error)

	GetMissingPvtDataInfoForMostRecentBlocks(maxBlock int) (ledger.MissingPvtDataInfo, error)

	Commit(blockNum uint64, pvtData []*ledger.TxPvtData, missingPvtData ledger.TxMissingPvtDataMap) error

	ProcessCollsEligibilityEnabled(committingBlk uint64, nsCollMap map[string][]string) error

	CommitPvtDataOfOldBlocks(blocksPvtData map[uint64][]*ledger.TxPvtData) error

	GetLastUpdatedOldBlocksPvtData() (map[uint64][]*ledger.TxPvtData, error)

	ResetLastUpdatedOldBlocksList() error

	IsEmpty() (bool, error)

	LastCommittedBlockHeight() (uint64, error)

	Shutdown()
}

type StoreEnv

type StoreEnv struct {
	TestStoreProvider Provider
	TestStore         Store
	// contains filtered or unexported fields
}

func NewTestStoreEnv

func NewTestStoreEnv(
	t *testing.T,
	ledgerid string,
	btlPolicy pvtdatapolicy.BTLPolicy,
	conf *PrivateDataConfig) *StoreEnv

func (*StoreEnv) Cleanup

func (env *StoreEnv) Cleanup()

func (*StoreEnv) CloseAndReopen

func (env *StoreEnv) CloseAndReopen()

type TxNums

type TxNums struct {
	List                 []uint64 `protobuf:"varint,1,rep,packed,name=list,proto3" json:"list,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TxNums) Descriptor

func (*TxNums) Descriptor() ([]byte, []int)

func (*TxNums) GetList

func (m *TxNums) GetList() []uint64

func (*TxNums) ProtoMessage

func (*TxNums) ProtoMessage()

func (*TxNums) Reset

func (m *TxNums) Reset()

func (*TxNums) String

func (m *TxNums) String() string

func (*TxNums) XXX_DiscardUnknown

func (m *TxNums) XXX_DiscardUnknown()

func (*TxNums) XXX_Marshal

func (m *TxNums) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxNums) XXX_Merge

func (dst *TxNums) XXX_Merge(src proto.Message)

func (*TxNums) XXX_Size

func (m *TxNums) XXX_Size() int

func (*TxNums) XXX_Unmarshal

func (m *TxNums) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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