inMemUtils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIncluded

func IsIncluded(expected *gabs.Container, resulted *gabs.Container) bool

Types

type InMemoryStorage

type InMemoryStorage struct {
	MetadataHandles       cmap.ConcurrentMap // Stored metadata of correspondent wallet.
	MetadataCounter       indyUtils.Counter
	StoredRecords         []StorageRecord    // Stored wallet records
	StorageHandles        cmap.ConcurrentMap // Storage handles
	StorageHandlesCounter indyUtils.Counter
	SearchHandles         cmap.ConcurrentMap // Search handles
	SearchHandlesName     cmap.ConcurrentMap
	SearchHandlesValue    cmap.ConcurrentMap
	SearchHandlesType     cmap.ConcurrentMap
	SearchHandlesTags     cmap.ConcurrentMap
	SearchHandlesIterator cmap.ConcurrentMap
	SearchHandleCounter   indyUtils.Counter
}

func NewInMemoryStorage

func NewInMemoryStorage() *InMemoryStorage

func (*InMemoryStorage) AddRecord

func (e *InMemoryStorage) AddRecord(storageHandle int, recordType string, recordId string, recordValue []byte, tagsJson string) (int, error)

func (*InMemoryStorage) AddRecordTags

func (e *InMemoryStorage) AddRecordTags(storageHandle int, recordType string, recordId string, tagsJson string) (int, error)

func (*InMemoryStorage) Close

func (e *InMemoryStorage) Close(storageHandle int) error

func (*InMemoryStorage) Create

func (e *InMemoryStorage) Create(storageName string, storageConfig string, credentialsJson string, metadata string) (int, error)

func (*InMemoryStorage) Delete

func (e *InMemoryStorage) Delete(storageName string, storageConfig string, credentialsJson string) (int, error)

func (*InMemoryStorage) DeleteRecord

func (e *InMemoryStorage) DeleteRecord(storageHandle int, recordType string, recordId string) (int, error)

func (*InMemoryStorage) DeleteRecordTags

func (e *InMemoryStorage) DeleteRecordTags(storageHandle int, recordType string, recordId string, tagsJson string) (int, error)

func (*InMemoryStorage) FetchSearchNext

func (e *InMemoryStorage) FetchSearchNext(storageHandle int, searchHandle int) (int, int, error)

func (*InMemoryStorage) FreeRecord

func (e *InMemoryStorage) FreeRecord(storageHandle int, recordHandle int) error

func (*InMemoryStorage) FreeSearch

func (e *InMemoryStorage) FreeSearch(storageHandle int, searchHandle int) error

func (*InMemoryStorage) FreeStorageMetadata

func (e *InMemoryStorage) FreeStorageMetadata(storageHandle int, metadataHandle int) error

func (*InMemoryStorage) GetRecordHandle

func (e *InMemoryStorage) GetRecordHandle(storageHandle int, recordType string, recordId string, optionsJson string) (int, int, error)

func (*InMemoryStorage) GetRecordId

func (e *InMemoryStorage) GetRecordId(storageHandle int, recordHandle int) (unsafe.Pointer, int, error)

func (*InMemoryStorage) GetRecordTags

func (e *InMemoryStorage) GetRecordTags(storageHandle int, recordHandle int) (unsafe.Pointer, int, error)

func (*InMemoryStorage) GetRecordType

func (e *InMemoryStorage) GetRecordType(storageHandle int, recordHandle int) (unsafe.Pointer, int, error)

func (*InMemoryStorage) GetRecordValue

func (e *InMemoryStorage) GetRecordValue(storageHandle int, recordHandle int) (wallet.RecordValue, int, error)

func (*InMemoryStorage) GetSearchTotalCount

func (e *InMemoryStorage) GetSearchTotalCount(storageHandle int, searchHandle int) (int, int, error)

func (*InMemoryStorage) GetStorageMetadata

func (e *InMemoryStorage) GetStorageMetadata(storageHandle int) (unsafe.Pointer, int, int, error)

func (*InMemoryStorage) Open

func (e *InMemoryStorage) Open(storageName string, storageConfig string, credentialsJson string) (int, int, error)

func (*InMemoryStorage) OpenSearch

func (e *InMemoryStorage) OpenSearch(storageHandle int, recordType string, queryJson string, optionsJson string) (int, int, error)

func (*InMemoryStorage) OpenSearchAll

func (e *InMemoryStorage) OpenSearchAll(storageHandle int) (int, int, error)

func (*InMemoryStorage) SetStorageMetadata

func (e *InMemoryStorage) SetStorageMetadata(storageHandle int, metadata string) (int, error)

func (*InMemoryStorage) UpdateRecordTags

func (e *InMemoryStorage) UpdateRecordTags(storageHandle int, recordType string, recordId string, tagsJson string) (int, error)

func (*InMemoryStorage) UpdateRecordValue

func (e *InMemoryStorage) UpdateRecordValue(storageHandle int, recordType string, recordId string, recordValue []byte) (int, error)

type Metadata

type Metadata struct {
	WalletId string `json:"wallet_id"`
	Value    string `json:"value"`
}

type StorageRecord

type StorageRecord struct {
	WalletId string `json:"wallet_id"`
	Id       string `json:"name,omitempty"`
	Type     string `json:"type,omitempty"`
	Value    []byte `json:"value,omitempty"`
	Tags     string `json:"tags,omitempty"`
}

Jump to

Keyboard shortcuts

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