Documentation ¶
Overview ¶
Package intkey provides an alternative intkey client implementation using sawtooth-client-sdk-go.
Index ¶
- Constants
- func GetAddress(name string) string
- func GetAddressPrefix() string
- type IntkeyClient
- func (self *IntkeyClient) Dec(name string, value uint, wait uint) (string, error)
- func (self *IntkeyClient) Inc(name string, value uint, wait uint) (string, error)
- func (self *IntkeyClient) List() (map[string]uint, error)
- func (self *IntkeyClient) Set(name string, value uint, wait uint) (string, error)
- func (self *IntkeyClient) Show(name string) (uint, error)
- func (self *IntkeyClient) Status(batchId string) (string, error)
- type IntkeyClientImpl
- func (self *IntkeyClientImpl) DecodeData(bytes []byte, ptr interface{}) error
- func (self *IntkeyClientImpl) DecodePayload(bytes []byte, ptr interface{}) error
- func (self *IntkeyClientImpl) EncodeData(data interface{}) ([]byte, error)
- func (self *IntkeyClientImpl) EncodePayload(payload interface{}) ([]byte, error)
- func (self *IntkeyClientImpl) GetFamilyName() string
- func (self *IntkeyClientImpl) GetFamilyVersion() string
- func (self *IntkeyClientImpl) GetPayloadInputAddresses(payload interface{}) []string
- func (self *IntkeyClientImpl) GetPayloadOutputAddresses(payload interface{}) []string
- type IntkeyPayload
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func GetAddress ¶
GetAddress returns the address of a particular intkey key.
func GetAddressPrefix ¶
func GetAddressPrefix() string
GetAddressPrefix returns the intkey address prefix.
Types ¶
type IntkeyClient ¶
type IntkeyClient struct {
*sawtooth_client_sdk_go.SawtoothClient
}
IntKeyClient is the client library for intkey.
func NewIntkeyClient ¶
func NewIntkeyClient(url string, keyFile string) (*IntkeyClient, error)
NewIntkeyClient returns a new instance of IntkeyClient.
func NewIntkeyClientZmq ¶
func NewIntkeyClientZmq(url string, keyFile string) (*IntkeyClient, error)
NewIntkeyClient returns a new instance of IntkeyClient that uses the ZMQ transport.
func (*IntkeyClient) List ¶
func (self *IntkeyClient) List() (map[string]uint, error)
List returns the current mapping of keys to values.
type IntkeyClientImpl ¶
type IntkeyClientImpl struct{}
IntkeyClientImpl is the type that implements the required SawtoothClientImpl interface.
func (*IntkeyClientImpl) DecodeData ¶
func (self *IntkeyClientImpl) DecodeData(bytes []byte, ptr interface{}) error
EncodePayDecodeDataload unmarshals a data item from bytes (in this case, using CBOR).
func (*IntkeyClientImpl) DecodePayload ¶
func (self *IntkeyClientImpl) DecodePayload(bytes []byte, ptr interface{}) error
EncodePayload unmarshals a payload from bytes (in this case, using CBOR).
func (*IntkeyClientImpl) EncodeData ¶
func (self *IntkeyClientImpl) EncodeData(data interface{}) ([]byte, error)
EncodeData marshals a data item into bytes (in this case, using CBOR).
func (*IntkeyClientImpl) EncodePayload ¶
func (self *IntkeyClientImpl) EncodePayload(payload interface{}) ([]byte, error)
EncodePayload marshals a payload into bytes (in this case, using CBOR).
func (*IntkeyClientImpl) GetFamilyName ¶
func (self *IntkeyClientImpl) GetFamilyName() string
GetFamilyName returns the family name.
func (*IntkeyClientImpl) GetFamilyVersion ¶
func (self *IntkeyClientImpl) GetFamilyVersion() string
GetFamilyVersion returns the family version.
func (*IntkeyClientImpl) GetPayloadInputAddresses ¶
func (self *IntkeyClientImpl) GetPayloadInputAddresses(payload interface{}) []string
GetPayloadInputAddresses returns the addresses of any state that the given payload is expected to access during processing.
func (*IntkeyClientImpl) GetPayloadOutputAddresses ¶
func (self *IntkeyClientImpl) GetPayloadOutputAddresses(payload interface{}) []string
GetPayloadOutputAddresses returns the addresses of any state that the given payload is expected to modify during processing.
type IntkeyPayload ¶
IntkeyPayload represents a payload meant for the intkey transaction processor.