processor

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddToken    = "store-token"
	DeleteToken = "delete-token"
	UpdateToken = "update-token"
)

Variables

This section is empty.

Functions

func Marshal added in v0.2.0

func Marshal(o interface{}) ([]byte, error)

func Unmarshal added in v0.2.0

func Unmarshal(raw []byte, o interface{}) error

Types

type CommonTokenStore

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

func NewCommonTokenStore

func NewCommonTokenStore(sp view2.ServiceProvider) (*CommonTokenStore, error)

func (*CommonTokenStore) DeleteFabToken

func (cts *CommonTokenStore) DeleteFabToken(ns string, txID string, index uint64, rws RWSet, deletedBy string) error

func (*CommonTokenStore) Notify

func (cts *CommonTokenStore) Notify(topic string, walletID, tokenType, txID string, index uint64)

func (*CommonTokenStore) StoreAuditToken

func (cts *CommonTokenStore) StoreAuditToken(ns string, txID string, index uint64, tok *token2.Token, rws RWSet, infoRaw []byte) error

func (*CommonTokenStore) StoreFabToken

func (cts *CommonTokenStore) StoreFabToken(ns string, txID string, index uint64, tok *token2.Token, rws RWSet, infoRaw []byte, ids []string) error

func (*CommonTokenStore) StoreIssuedHistoryToken

func (cts *CommonTokenStore) StoreIssuedHistoryToken(ns string, txID string, index uint64, tok *token2.Token, rws RWSet, infoRaw []byte, issuer view.Identity, precision uint64) error

type GetStateOpt

type GetStateOpt int

type RWSet

type RWSet interface {
	SetState(namespace string, key string, value []byte) error
	GetState(namespace string, key string) ([]byte, error)
	GetStateMetadata(namespace, key string) (map[string][]byte, error)
	DeleteState(namespace string, key string) error
	SetStateMetadata(namespace, key string, metadata map[string][]byte) error
}

type TokenMessage

type TokenMessage struct {
	WalletID  string
	TokenType string
	TxID      string
	Index     uint64
}

type TokenProcessorEvent

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

func NewTokenProcessorEvent

func NewTokenProcessorEvent(topic string, message *TokenMessage) *TokenProcessorEvent

func (*TokenProcessorEvent) Message

func (t *TokenProcessorEvent) Message() interface{}

func (*TokenProcessorEvent) Topic

func (t *TokenProcessorEvent) Topic() string

type TokenStore

type TokenStore interface {
	// DeleteFabToken adds to the passed rws the deletion of the passed token
	DeleteFabToken(ns string, txID string, index uint64, rws RWSet, deletedBy string) error
	StoreFabToken(ns string, txID string, index uint64, tok *token2.Token, rws RWSet, infoRaw []byte, ids []string) error
	StoreIssuedHistoryToken(ns string, txID string, index uint64, tok *token2.Token, rws RWSet, infoRaw []byte, issuer view.Identity, precision uint64) error
	StoreAuditToken(ns string, txID string, index uint64, tok *token2.Token, rws RWSet, infoRaw []byte) error
}

Jump to

Keyboard shortcuts

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