protoblocktx

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0:   "COMMITTED",
		1:   "ABORTED_MVCC_CONFLICT",
		2:   "ABORTED_DUPLICATE_TXID",
		3:   "ABORTED_SIGNATURE_INVALID",
		4:   "ABORTED_MISSING_TXID",
		5:   "ABORTED_DUPLICATE_NAMESPACE",
		6:   "ABORTED_NAMESPACE_POLICY_INVALID",
		7:   "ABORTED_NAMESPACE_ID_INVALID",
		9:   "ABORTED_BLIND_WRITES_NOT_ALLOWED",
		10:  "ABORTED_NO_WRITES",
		11:  "ABORTED_UNSUPPORTED_TX_PAYLOAD",
		12:  "ABORTED_NIL_KEY",
		13:  "ABORTED_DUPLICATE_KEY_IN_READ_WRITE_SET",
		14:  "ABORTED_EMPTY_NAMESPACES",
		255: "NOT_VALIDATED",
	}
	Status_value = map[string]int32{
		"COMMITTED":                               0,
		"ABORTED_MVCC_CONFLICT":                   1,
		"ABORTED_DUPLICATE_TXID":                  2,
		"ABORTED_SIGNATURE_INVALID":               3,
		"ABORTED_MISSING_TXID":                    4,
		"ABORTED_DUPLICATE_NAMESPACE":             5,
		"ABORTED_NAMESPACE_POLICY_INVALID":        6,
		"ABORTED_NAMESPACE_ID_INVALID":            7,
		"ABORTED_BLIND_WRITES_NOT_ALLOWED":        9,
		"ABORTED_NO_WRITES":                       10,
		"ABORTED_UNSUPPORTED_TX_PAYLOAD":          11,
		"ABORTED_NIL_KEY":                         12,
		"ABORTED_DUPLICATE_KEY_IN_READ_WRITE_SET": 13,
		"ABORTED_EMPTY_NAMESPACES":                14,
		"NOT_VALIDATED":                           255,
	}
)

Enum value maps for Status.

View Source
var File_api_protoblocktx_block_tx_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BlockInfo

type BlockInfo struct {
	Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockInfo) Descriptor deprecated

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

Deprecated: Use BlockInfo.ProtoReflect.Descriptor instead.

func (*BlockInfo) GetNumber

func (x *BlockInfo) GetNumber() uint64

func (*BlockInfo) ProtoMessage

func (*BlockInfo) ProtoMessage()

func (*BlockInfo) ProtoReflect

func (x *BlockInfo) ProtoReflect() protoreflect.Message

func (*BlockInfo) Reset

func (x *BlockInfo) Reset()

func (*BlockInfo) String

func (x *BlockInfo) String() string

type ConfigTransaction

type ConfigTransaction struct {
	Envelope []byte `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"`
	Version  uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigTransaction) Descriptor deprecated

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

Deprecated: Use ConfigTransaction.ProtoReflect.Descriptor instead.

func (*ConfigTransaction) GetEnvelope

func (x *ConfigTransaction) GetEnvelope() []byte

func (*ConfigTransaction) GetVersion

func (x *ConfigTransaction) GetVersion() uint64

func (*ConfigTransaction) ProtoMessage

func (*ConfigTransaction) ProtoMessage()

func (*ConfigTransaction) ProtoReflect

func (x *ConfigTransaction) ProtoReflect() protoreflect.Message

func (*ConfigTransaction) Reset

func (x *ConfigTransaction) Reset()

func (*ConfigTransaction) String

func (x *ConfigTransaction) String() string

type LastCommittedBlock

type LastCommittedBlock struct {
	Block *BlockInfo `protobuf:"bytes,1,opt,name=block,proto3,oneof" json:"block,omitempty"`
	// contains filtered or unexported fields
}

func (*LastCommittedBlock) Descriptor deprecated

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

Deprecated: Use LastCommittedBlock.ProtoReflect.Descriptor instead.

func (*LastCommittedBlock) GetBlock

func (x *LastCommittedBlock) GetBlock() *BlockInfo

func (*LastCommittedBlock) ProtoMessage

func (*LastCommittedBlock) ProtoMessage()

func (*LastCommittedBlock) ProtoReflect

func (x *LastCommittedBlock) ProtoReflect() protoreflect.Message

func (*LastCommittedBlock) Reset

func (x *LastCommittedBlock) Reset()

func (*LastCommittedBlock) String

func (x *LastCommittedBlock) String() string

type NamespacePolicies

type NamespacePolicies struct {
	Policies []*PolicyItem `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"`
	// contains filtered or unexported fields
}

func (*NamespacePolicies) Descriptor deprecated

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

Deprecated: Use NamespacePolicies.ProtoReflect.Descriptor instead.

func (*NamespacePolicies) GetPolicies

func (x *NamespacePolicies) GetPolicies() []*PolicyItem

func (*NamespacePolicies) ProtoMessage

func (*NamespacePolicies) ProtoMessage()

func (*NamespacePolicies) ProtoReflect

func (x *NamespacePolicies) ProtoReflect() protoreflect.Message

func (*NamespacePolicies) Reset

func (x *NamespacePolicies) Reset()

func (*NamespacePolicies) String

func (x *NamespacePolicies) String() string

type NamespacePolicy

type NamespacePolicy struct {
	Scheme    string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"`                        // The scheme for signature verification.
	PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The public key for signature verification.
	// contains filtered or unexported fields
}

Represents a namespace policy.

func (*NamespacePolicy) Descriptor deprecated

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

Deprecated: Use NamespacePolicy.ProtoReflect.Descriptor instead.

func (*NamespacePolicy) GetPublicKey

func (x *NamespacePolicy) GetPublicKey() []byte

func (*NamespacePolicy) GetScheme

func (x *NamespacePolicy) GetScheme() string

func (*NamespacePolicy) ProtoMessage

func (*NamespacePolicy) ProtoMessage()

func (*NamespacePolicy) ProtoReflect

func (x *NamespacePolicy) ProtoReflect() protoreflect.Message

func (*NamespacePolicy) Reset

func (x *NamespacePolicy) Reset()

func (*NamespacePolicy) String

func (x *NamespacePolicy) String() string

type PolicyItem

type PolicyItem struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Policy    []byte `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"`
	Version   uint64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyItem) Descriptor deprecated

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

Deprecated: Use PolicyItem.ProtoReflect.Descriptor instead.

func (*PolicyItem) GetNamespace

func (x *PolicyItem) GetNamespace() string

func (*PolicyItem) GetPolicy

func (x *PolicyItem) GetPolicy() []byte

func (*PolicyItem) GetVersion

func (x *PolicyItem) GetVersion() uint64

func (*PolicyItem) ProtoMessage

func (*PolicyItem) ProtoMessage()

func (*PolicyItem) ProtoReflect

func (x *PolicyItem) ProtoReflect() protoreflect.Message

func (*PolicyItem) Reset

func (x *PolicyItem) Reset()

func (*PolicyItem) String

func (x *PolicyItem) String() string

type QueryStatus

type QueryStatus struct {
	TxIDs []string `protobuf:"bytes,1,rep,name=txIDs,proto3" json:"txIDs,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryStatus) Descriptor deprecated

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

Deprecated: Use QueryStatus.ProtoReflect.Descriptor instead.

func (*QueryStatus) GetTxIDs

func (x *QueryStatus) GetTxIDs() []string

func (*QueryStatus) ProtoMessage

func (*QueryStatus) ProtoMessage()

func (*QueryStatus) ProtoReflect

func (x *QueryStatus) ProtoReflect() protoreflect.Message

func (*QueryStatus) Reset

func (x *QueryStatus) Reset()

func (*QueryStatus) String

func (x *QueryStatus) String() string

type Read

type Read struct {
	Key     []byte  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`                // The key being read.
	Version *uint64 `protobuf:"varint,2,opt,name=version,proto3,oneof" json:"version,omitempty"` // The version of the key being read. Nil version means it doesn't exist.
	// contains filtered or unexported fields
}

Represents a read operation.

func (*Read) Descriptor deprecated

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

Deprecated: Use Read.ProtoReflect.Descriptor instead.

func (*Read) GetKey

func (x *Read) GetKey() []byte

func (*Read) GetVersion

func (x *Read) GetVersion() uint64

func (*Read) ProtoMessage

func (*Read) ProtoMessage()

func (*Read) ProtoReflect

func (x *Read) ProtoReflect() protoreflect.Message

func (*Read) Reset

func (x *Read) Reset()

func (*Read) String

func (x *Read) String() string

type ReadWrite

type ReadWrite struct {
	Key     []byte  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`                // The key involved in the read-write operation.
	Version *uint64 `protobuf:"varint,2,opt,name=version,proto3,oneof" json:"version,omitempty"` // The version of the key being read and written. Nil version means it doesn't exist.
	Value   []byte  `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`            // The value associated with the key being written.
	// contains filtered or unexported fields
}

Represents a read-write operation.

func (*ReadWrite) Descriptor deprecated

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

Deprecated: Use ReadWrite.ProtoReflect.Descriptor instead.

func (*ReadWrite) GetKey

func (x *ReadWrite) GetKey() []byte

func (*ReadWrite) GetValue

func (x *ReadWrite) GetValue() []byte

func (*ReadWrite) GetVersion

func (x *ReadWrite) GetVersion() uint64

func (*ReadWrite) ProtoMessage

func (*ReadWrite) ProtoMessage()

func (*ReadWrite) ProtoReflect

func (x *ReadWrite) ProtoReflect() protoreflect.Message

func (*ReadWrite) Reset

func (x *ReadWrite) Reset()

func (*ReadWrite) String

func (x *ReadWrite) String() string

type Status

type Status int32
const (
	Status_COMMITTED                               Status = 0
	Status_ABORTED_MVCC_CONFLICT                   Status = 1
	Status_ABORTED_DUPLICATE_TXID                  Status = 2
	Status_ABORTED_SIGNATURE_INVALID               Status = 3
	Status_ABORTED_MISSING_TXID                    Status = 4
	Status_ABORTED_DUPLICATE_NAMESPACE             Status = 5
	Status_ABORTED_NAMESPACE_POLICY_INVALID        Status = 6
	Status_ABORTED_NAMESPACE_ID_INVALID            Status = 7
	Status_ABORTED_BLIND_WRITES_NOT_ALLOWED        Status = 9
	Status_ABORTED_NO_WRITES                       Status = 10
	Status_ABORTED_UNSUPPORTED_TX_PAYLOAD          Status = 11
	Status_ABORTED_NIL_KEY                         Status = 12
	Status_ABORTED_DUPLICATE_KEY_IN_READ_WRITE_SET Status = 13
	Status_ABORTED_EMPTY_NAMESPACES                Status = 14
	Status_NOT_VALIDATED                           Status = 255
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type StatusWithHeight

type StatusWithHeight struct {
	Code        Status `protobuf:"varint,1,opt,name=code,proto3,enum=protoblocktx.Status" json:"code,omitempty"`
	BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	TxNumber    uint32 `protobuf:"varint,3,opt,name=tx_number,json=txNumber,proto3" json:"tx_number,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusWithHeight) Descriptor deprecated

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

Deprecated: Use StatusWithHeight.ProtoReflect.Descriptor instead.

func (*StatusWithHeight) GetBlockNumber

func (x *StatusWithHeight) GetBlockNumber() uint64

func (*StatusWithHeight) GetCode

func (x *StatusWithHeight) GetCode() Status

func (*StatusWithHeight) GetTxNumber

func (x *StatusWithHeight) GetTxNumber() uint32

func (*StatusWithHeight) ProtoMessage

func (*StatusWithHeight) ProtoMessage()

func (*StatusWithHeight) ProtoReflect

func (x *StatusWithHeight) ProtoReflect() protoreflect.Message

func (*StatusWithHeight) Reset

func (x *StatusWithHeight) Reset()

func (*StatusWithHeight) String

func (x *StatusWithHeight) String() string

type TransactionsStatus

type TransactionsStatus struct {
	Status map[string]*StatusWithHeight `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TransactionsStatus) Descriptor deprecated

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

Deprecated: Use TransactionsStatus.ProtoReflect.Descriptor instead.

func (*TransactionsStatus) GetStatus

func (x *TransactionsStatus) GetStatus() map[string]*StatusWithHeight

func (*TransactionsStatus) ProtoMessage

func (*TransactionsStatus) ProtoMessage()

func (*TransactionsStatus) ProtoReflect

func (x *TransactionsStatus) ProtoReflect() protoreflect.Message

func (*TransactionsStatus) Reset

func (x *TransactionsStatus) Reset()

func (*TransactionsStatus) String

func (x *TransactionsStatus) String() string

type Tx

type Tx struct {
	Id         string         `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                 // The transaction ID.
	Namespaces []*TxNamespace `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"` // Namespaces associated with the transaction.
	Signatures [][]byte       `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` // signature per namespace.
	// contains filtered or unexported fields
}

Represents a transaction in the blockchain.

func (*Tx) Descriptor deprecated

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

Deprecated: Use Tx.ProtoReflect.Descriptor instead.

func (*Tx) GetId

func (x *Tx) GetId() string

func (*Tx) GetNamespaces

func (x *Tx) GetNamespaces() []*TxNamespace

func (*Tx) GetSignatures

func (x *Tx) GetSignatures() [][]byte

func (*Tx) ProtoMessage

func (*Tx) ProtoMessage()

func (*Tx) ProtoReflect

func (x *Tx) ProtoReflect() protoreflect.Message

func (*Tx) Reset

func (x *Tx) Reset()

func (*Tx) String

func (x *Tx) String() string

type TxNamespace

type TxNamespace struct {
	NsId        string       `protobuf:"bytes,1,opt,name=ns_id,json=nsId,proto3" json:"ns_id,omitempty"`                      // The namespace ID.
	NsVersion   uint64       `protobuf:"varint,2,opt,name=ns_version,json=nsVersion,proto3" json:"ns_version,omitempty"`      // The version of the namespace.
	ReadsOnly   []*Read      `protobuf:"bytes,3,rep,name=reads_only,json=readsOnly,proto3" json:"reads_only,omitempty"`       // List of read only operations within the namespace.
	ReadWrites  []*ReadWrite `protobuf:"bytes,4,rep,name=read_writes,json=readWrites,proto3" json:"read_writes,omitempty"`    // List of read-write operations within the namespace.
	BlindWrites []*Write     `protobuf:"bytes,5,rep,name=blind_writes,json=blindWrites,proto3" json:"blind_writes,omitempty"` // List of blind write operations within the namespace.
	// contains filtered or unexported fields
}

Represents a namespace within a transaction.

func (*TxNamespace) Descriptor deprecated

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

Deprecated: Use TxNamespace.ProtoReflect.Descriptor instead.

func (*TxNamespace) GetBlindWrites

func (x *TxNamespace) GetBlindWrites() []*Write

func (*TxNamespace) GetNsId

func (x *TxNamespace) GetNsId() string

func (*TxNamespace) GetNsVersion

func (x *TxNamespace) GetNsVersion() uint64

func (*TxNamespace) GetReadWrites

func (x *TxNamespace) GetReadWrites() []*ReadWrite

func (*TxNamespace) GetReadsOnly

func (x *TxNamespace) GetReadsOnly() []*Read

func (*TxNamespace) ProtoMessage

func (*TxNamespace) ProtoMessage()

func (*TxNamespace) ProtoReflect

func (x *TxNamespace) ProtoReflect() protoreflect.Message

func (*TxNamespace) Reset

func (x *TxNamespace) Reset()

func (*TxNamespace) String

func (x *TxNamespace) String() string

type Write

type Write struct {
	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`     // The key being written.
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The value associated with the key being written.
	// contains filtered or unexported fields
}

Represents a write operation.

func (*Write) Descriptor deprecated

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

Deprecated: Use Write.ProtoReflect.Descriptor instead.

func (*Write) GetKey

func (x *Write) GetKey() []byte

func (*Write) GetValue

func (x *Write) GetValue() []byte

func (*Write) ProtoMessage

func (*Write) ProtoMessage()

func (*Write) ProtoReflect

func (x *Write) ProtoReflect() protoreflect.Message

func (*Write) Reset

func (x *Write) Reset()

func (*Write) String

func (x *Write) String() string

Jump to

Keyboard shortcuts

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