pbgo

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var TransactionTypes_name = map[int32]string{
	0: "SMARTCONTRACT",
	1: "FIRSTBLOCK",
	2: "STOPNETWORK",
}
View Source
var TransactionTypes_value = map[string]int32{
	"SMARTCONTRACT": 0,
	"FIRSTBLOCK":    1,
	"STOPNETWORK":   2,
}
View Source
var TxInvokeStatusCode_name = map[int32]string{
	0: "SUCCESS",
	1: "PENALTY",
	2: "FAILED",
	3: "PENDING",
}
View Source
var TxInvokeStatusCode_value = map[string]int32{
	"SUCCESS": 0,
	"PENALTY": 1,
	"FAILED":  2,
	"PENDING": 3,
}

Functions

This section is empty.

Types

type FirstBlock

type FirstBlock struct {
	KeyId                 int64  `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	Timestamp             int64  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	PublicKey             []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	NodePublicKey         []byte `protobuf:"bytes,4,opt,name=node_public_key,json=nodePublicKey,proto3" json:"node_public_key,omitempty"`
	StopNetworkCertBundle []byte `` /* 128-byte string literal not displayed */
	Test                  int64  `protobuf:"varint,6,opt,name=test,proto3" json:"test,omitempty"`
	PrivateBlockchain     uint64 `protobuf:"varint,7,opt,name=private_blockchain,json=privateBlockchain,proto3" json:"private_blockchain,omitempty"`
}

func (*FirstBlock) Descriptor

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

func (*FirstBlock) GetKeyId

func (m *FirstBlock) GetKeyId() int64

func (*FirstBlock) GetNodePublicKey

func (m *FirstBlock) GetNodePublicKey() []byte

func (*FirstBlock) GetPrivateBlockchain

func (m *FirstBlock) GetPrivateBlockchain() uint64

func (*FirstBlock) GetPublicKey

func (m *FirstBlock) GetPublicKey() []byte

func (*FirstBlock) GetStopNetworkCertBundle

func (m *FirstBlock) GetStopNetworkCertBundle() []byte

func (*FirstBlock) GetTest

func (m *FirstBlock) GetTest() int64

func (*FirstBlock) GetTimestamp

func (m *FirstBlock) GetTimestamp() int64

func (*FirstBlock) Marshal

func (m *FirstBlock) Marshal() (dAtA []byte, err error)

func (*FirstBlock) MarshalTo

func (m *FirstBlock) MarshalTo(dAtA []byte) (int, error)

func (*FirstBlock) MarshalToSizedBuffer

func (m *FirstBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FirstBlock) ProtoMessage

func (*FirstBlock) ProtoMessage()

func (*FirstBlock) Reset

func (m *FirstBlock) Reset()

func (*FirstBlock) Size

func (m *FirstBlock) Size() (n int)

func (*FirstBlock) String

func (m *FirstBlock) String() string

func (*FirstBlock) Unmarshal

func (m *FirstBlock) Unmarshal(dAtA []byte) error

func (*FirstBlock) XXX_DiscardUnknown

func (m *FirstBlock) XXX_DiscardUnknown()

func (*FirstBlock) XXX_Marshal

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

func (*FirstBlock) XXX_Merge

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

func (*FirstBlock) XXX_Size

func (m *FirstBlock) XXX_Size() int

func (*FirstBlock) XXX_Unmarshal

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

type StopNetwork

type StopNetwork struct {
	KeyId           int64  `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	Timestamp       int64  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	StopNetworkCert []byte `protobuf:"bytes,3,opt,name=stop_network_cert,json=stopNetworkCert,proto3" json:"stop_network_cert,omitempty"`
}

func (*StopNetwork) Descriptor

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

func (*StopNetwork) GetKeyId

func (m *StopNetwork) GetKeyId() int64

func (*StopNetwork) GetStopNetworkCert

func (m *StopNetwork) GetStopNetworkCert() []byte

func (*StopNetwork) GetTimestamp

func (m *StopNetwork) GetTimestamp() int64

func (*StopNetwork) Marshal

func (m *StopNetwork) Marshal() (dAtA []byte, err error)

func (*StopNetwork) MarshalTo

func (m *StopNetwork) MarshalTo(dAtA []byte) (int, error)

func (*StopNetwork) MarshalToSizedBuffer

func (m *StopNetwork) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StopNetwork) ProtoMessage

func (*StopNetwork) ProtoMessage()

func (*StopNetwork) Reset

func (m *StopNetwork) Reset()

func (*StopNetwork) Size

func (m *StopNetwork) Size() (n int)

func (*StopNetwork) String

func (m *StopNetwork) String() string

func (*StopNetwork) Unmarshal

func (m *StopNetwork) Unmarshal(dAtA []byte) error

func (*StopNetwork) XXX_DiscardUnknown

func (m *StopNetwork) XXX_DiscardUnknown()

func (*StopNetwork) XXX_Marshal

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

func (*StopNetwork) XXX_Merge

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

func (*StopNetwork) XXX_Size

func (m *StopNetwork) XXX_Size() int

func (*StopNetwork) XXX_Unmarshal

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

type TransactionTypes

type TransactionTypes int32

Transaction types.

const (
	TransactionTypes_SMARTCONTRACT TransactionTypes = 0
	TransactionTypes_FIRSTBLOCK    TransactionTypes = 1
	TransactionTypes_STOPNETWORK   TransactionTypes = 2
)

func (TransactionTypes) EnumDescriptor

func (TransactionTypes) EnumDescriptor() ([]byte, []int)

func (TransactionTypes) String

func (x TransactionTypes) String() string

type TxInvokeStatusCode

type TxInvokeStatusCode int32

Transaction invoke status code.

const (
	TxInvokeStatusCode_SUCCESS TxInvokeStatusCode = 0
	TxInvokeStatusCode_PENALTY TxInvokeStatusCode = 1
	TxInvokeStatusCode_FAILED  TxInvokeStatusCode = 2
	TxInvokeStatusCode_PENDING TxInvokeStatusCode = 3
)

func (TxInvokeStatusCode) EnumDescriptor

func (TxInvokeStatusCode) EnumDescriptor() ([]byte, []int)

func (TxInvokeStatusCode) String

func (x TxInvokeStatusCode) String() string

type TxResult

type TxResult struct {
	Hash    []byte             `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	BlockId int64              `protobuf:"varint,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
	Code    TxInvokeStatusCode `protobuf:"varint,3,opt,name=code,proto3,enum=pbgo.TxInvokeStatusCode" json:"code,omitempty"`
	Result  string             `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"`
	Error   string             `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
}

func (*TxResult) Descriptor

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

func (*TxResult) GetBlockId

func (m *TxResult) GetBlockId() int64

func (*TxResult) GetCode

func (m *TxResult) GetCode() TxInvokeStatusCode

func (*TxResult) GetError

func (m *TxResult) GetError() string

func (*TxResult) GetHash

func (m *TxResult) GetHash() []byte

func (*TxResult) GetResult

func (m *TxResult) GetResult() string

func (*TxResult) Marshal

func (m *TxResult) Marshal() (dAtA []byte, err error)

func (*TxResult) MarshalTo

func (m *TxResult) MarshalTo(dAtA []byte) (int, error)

func (*TxResult) MarshalToSizedBuffer

func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TxResult) ProtoMessage

func (*TxResult) ProtoMessage()

func (*TxResult) Reset

func (m *TxResult) Reset()

func (*TxResult) Size

func (m *TxResult) Size() (n int)

func (*TxResult) String

func (m *TxResult) String() string

func (*TxResult) Unmarshal

func (m *TxResult) Unmarshal(dAtA []byte) error

func (*TxResult) XXX_DiscardUnknown

func (m *TxResult) XXX_DiscardUnknown()

func (*TxResult) XXX_Marshal

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

func (*TxResult) XXX_Merge

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

func (*TxResult) XXX_Size

func (m *TxResult) XXX_Size() int

func (*TxResult) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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