core

package
v0.0.0-...-d84c2b0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerContext

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

func NewConsumerContext

func NewConsumerContext() *ConsumerContext

func (*ConsumerContext) AddEvent

func (c *ConsumerContext) AddEvent(eventType string, attributes []processor.Attribute, eventData []byte) error

func (*ConsumerContext) DeleteState

func (c *ConsumerContext) DeleteState(key string) error

func (*ConsumerContext) GetBatchId

func (c *ConsumerContext) GetBatchId() string

func (*ConsumerContext) GetSigner

func (c *ConsumerContext) GetSigner() string

func (*ConsumerContext) GetState

func (c *ConsumerContext) GetState(key string) ([]byte, error)

func (*ConsumerContext) PutState

func (c *ConsumerContext) PutState(key string, value []byte) error

func (*ConsumerContext) SetBatchId

func (c *ConsumerContext) SetBatchId(batchId string)

func (*ConsumerContext) SetSigner

func (c *ConsumerContext) SetSigner(signer string)

type Context

type Context interface {
	GetState(key string) ([]byte, error)
	PutState(key string, value []byte) error
	DeleteState(key string) error
	GetBatchId() string
	GetSigner() string
	AddEvent(eventType string, attributes []processor.Attribute, eventData []byte) error
}

type ProviderContext

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

func NewProviderContext

func NewProviderContext(contractName string, contractVersion string, signer string, proxy *processor.Context) *ProviderContext

func (*ProviderContext) AddEvent

func (c *ProviderContext) AddEvent(eventType string, attributes []processor.Attribute, eventData []byte) error

func (*ProviderContext) DeleteState

func (c *ProviderContext) DeleteState(key string) error

func (*ProviderContext) GetBatchId

func (c *ProviderContext) GetBatchId() string

func (*ProviderContext) GetSigner

func (c *ProviderContext) GetSigner() string

func (*ProviderContext) GetState

func (c *ProviderContext) GetState(key string) ([]byte, error)

func (*ProviderContext) PutState

func (c *ProviderContext) PutState(key string, value []byte) error

type SawtoothRequest

type SawtoothRequest struct {
	ContractName    string `json:"contract_name"`
	ContractVersion string `json:"contract_version"`
	MethodName      string `json:"method_name"`
	Payload         []byte `json:"payload"`
	Signer          string `json:"signer"`
}

type SawtoothResponse

type SawtoothResponse struct {
	Error   string `json:"error"`
	Payload []byte `json:"payload"`
}

type SmartContract

type SmartContract interface {
	// Name refers to sawtooth transaction family name
	Name() string
	// Version refers to sawtooth transaction family version
	Version() string
}

Jump to

Keyboard shortcuts

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