common

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_smartbft_common_common_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BFTMetadata

type BFTMetadata struct {
	Value      []byte                  `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Signatures []*BFTMetadataSignature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

Metadata is a common structure to be used to encode block metadata

func (*BFTMetadata) Descriptor deprecated

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

Deprecated: Use BFTMetadata.ProtoReflect.Descriptor instead.

func (*BFTMetadata) GetSignatures

func (x *BFTMetadata) GetSignatures() []*BFTMetadataSignature

func (*BFTMetadata) GetValue

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

func (*BFTMetadata) ProtoMessage

func (*BFTMetadata) ProtoMessage()

func (*BFTMetadata) ProtoReflect

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

func (*BFTMetadata) Reset

func (x *BFTMetadata) Reset()

func (*BFTMetadata) String

func (x *BFTMetadata) String() string

func (*BFTMetadata) Validate

func (m *BFTMetadata) Validate() error

Validate checks the field values on BFTMetadata with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*BFTMetadata) ValidateAll

func (m *BFTMetadata) ValidateAll() error

ValidateAll checks the field values on BFTMetadata with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BFTMetadataMultiError, or nil if none found.

type BFTMetadataMultiError

type BFTMetadataMultiError []error

BFTMetadataMultiError is an error wrapping multiple validation errors returned by BFTMetadata.ValidateAll() if the designated constraints aren't met.

func (BFTMetadataMultiError) AllErrors

func (m BFTMetadataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BFTMetadataMultiError) Error

func (m BFTMetadataMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type BFTMetadataSignature

type BFTMetadataSignature struct {
	SignatureHeader []byte `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"` // An encoded SignatureHeader
	Signature       []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`                                    // The signature over the concatenation of the Metadata value bytes, signatureHeader, and block header
	SignerId        uint64 `protobuf:"varint,3,opt,name=signer_id,json=signerId,proto3" json:"signer_id,omitempty"`
	Nonce           []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

func (*BFTMetadataSignature) Descriptor deprecated

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

Deprecated: Use BFTMetadataSignature.ProtoReflect.Descriptor instead.

func (*BFTMetadataSignature) GetNonce

func (x *BFTMetadataSignature) GetNonce() []byte

func (*BFTMetadataSignature) GetSignature

func (x *BFTMetadataSignature) GetSignature() []byte

func (*BFTMetadataSignature) GetSignatureHeader

func (x *BFTMetadataSignature) GetSignatureHeader() []byte

func (*BFTMetadataSignature) GetSignerId

func (x *BFTMetadataSignature) GetSignerId() uint64

func (*BFTMetadataSignature) ProtoMessage

func (*BFTMetadataSignature) ProtoMessage()

func (*BFTMetadataSignature) ProtoReflect

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

func (*BFTMetadataSignature) Reset

func (x *BFTMetadataSignature) Reset()

func (*BFTMetadataSignature) String

func (x *BFTMetadataSignature) String() string

func (*BFTMetadataSignature) Validate

func (m *BFTMetadataSignature) Validate() error

Validate checks the field values on BFTMetadataSignature with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*BFTMetadataSignature) ValidateAll

func (m *BFTMetadataSignature) ValidateAll() error

ValidateAll checks the field values on BFTMetadataSignature with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BFTMetadataSignatureMultiError, or nil if none found.

type BFTMetadataSignatureMultiError

type BFTMetadataSignatureMultiError []error

BFTMetadataSignatureMultiError is an error wrapping multiple validation errors returned by BFTMetadataSignature.ValidateAll() if the designated constraints aren't met.

func (BFTMetadataSignatureMultiError) AllErrors

func (m BFTMetadataSignatureMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BFTMetadataSignatureMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type BFTMetadataSignatureValidationError

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

BFTMetadataSignatureValidationError is the validation error returned by BFTMetadataSignature.Validate if the designated constraints aren't met.

func (BFTMetadataSignatureValidationError) Cause

Cause function returns cause value.

func (BFTMetadataSignatureValidationError) Error

Error satisfies the builtin error interface

func (BFTMetadataSignatureValidationError) ErrorName

ErrorName returns error name.

func (BFTMetadataSignatureValidationError) Field

Field function returns field value.

func (BFTMetadataSignatureValidationError) Key

Key function returns key value.

func (BFTMetadataSignatureValidationError) Reason

Reason function returns reason value.

type BFTMetadataValidationError

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

BFTMetadataValidationError is the validation error returned by BFTMetadata.Validate if the designated constraints aren't met.

func (BFTMetadataValidationError) Cause

Cause function returns cause value.

func (BFTMetadataValidationError) Error

Error satisfies the builtin error interface

func (BFTMetadataValidationError) ErrorName

func (e BFTMetadataValidationError) ErrorName() string

ErrorName returns error name.

func (BFTMetadataValidationError) Field

Field function returns field value.

func (BFTMetadataValidationError) Key

Key function returns key value.

func (BFTMetadataValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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