protov1

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProcessingStatus_name = map[int32]string{
		0: "PROCESSING_STATUS_UNSPECIFIED",
		1: "PROCESSING_STATUS_RECEIVED",
		2: "PROCESSING_STATUS_SENT_TO_SOLVER",
		3: "PROCESSING_STATUS_SOLVED",
		4: "PROCESSING_STATUS_UNSOLVED",
		5: "PROCESSING_STATUS_EXPIRED",
		6: "PROCESSING_STATUS_ON_CHAIN",
		7: "PROCESSING_STATUS_INVALID",
	}
	ProcessingStatus_value = map[string]int32{
		"PROCESSING_STATUS_UNSPECIFIED":    0,
		"PROCESSING_STATUS_RECEIVED":       1,
		"PROCESSING_STATUS_SENT_TO_SOLVER": 2,
		"PROCESSING_STATUS_SOLVED":         3,
		"PROCESSING_STATUS_UNSOLVED":       4,
		"PROCESSING_STATUS_EXPIRED":        5,
		"PROCESSING_STATUS_ON_CHAIN":       6,
		"PROCESSING_STATUS_INVALID":        7,
	}
)

Enum value maps for ProcessingStatus.

View Source
var File_proto_v1_asset_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Asset added in v0.28.1

type Asset struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The address of the asset.
	// The amount of the asset.
	// In cases of AssetType being used as the to field, it doesn't have to provided
	// and can be left empty
	Amount  *BigInt `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	ChainId *BigInt `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // The chain ID where the asset resides.
	// contains filtered or unexported fields
}

Message representing the details of an asset.

func (*Asset) Descriptor deprecated added in v0.28.1

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

Deprecated: Use Asset.ProtoReflect.Descriptor instead.

func (*Asset) GetAddress added in v0.28.1

func (x *Asset) GetAddress() string

func (*Asset) GetAmount added in v0.28.1

func (x *Asset) GetAmount() *BigInt

func (*Asset) GetChainId added in v0.28.1

func (x *Asset) GetChainId() *BigInt

func (*Asset) ProtoMessage added in v0.28.1

func (*Asset) ProtoMessage()

func (*Asset) ProtoReflect added in v0.28.1

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

func (*Asset) Reset added in v0.28.1

func (x *Asset) Reset()

func (*Asset) String added in v0.28.1

func (x *Asset) String() string

func (*Asset) Validate added in v0.28.1

func (m *Asset) Validate() error

Validate checks the field values on Asset 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 (*Asset) ValidateAll added in v0.28.1

func (m *Asset) ValidateAll() error

ValidateAll checks the field values on Asset 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 AssetMultiError, or nil if none found.

type AssetMultiError added in v0.28.1

type AssetMultiError []error

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

func (AssetMultiError) AllErrors added in v0.28.1

func (m AssetMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AssetMultiError) Error added in v0.28.1

func (m AssetMultiError) Error() string

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

type AssetValidationError added in v0.28.1

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

AssetValidationError is the validation error returned by Asset.Validate if the designated constraints aren't met.

func (AssetValidationError) Cause added in v0.28.1

func (e AssetValidationError) Cause() error

Cause function returns cause value.

func (AssetValidationError) Error added in v0.28.1

func (e AssetValidationError) Error() string

Error satisfies the builtin error interface

func (AssetValidationError) ErrorName added in v0.28.1

func (e AssetValidationError) ErrorName() string

ErrorName returns error name.

func (AssetValidationError) Field added in v0.28.1

func (e AssetValidationError) Field() string

Field function returns field value.

func (AssetValidationError) Key added in v0.28.1

func (e AssetValidationError) Key() bool

Key function returns key value.

func (AssetValidationError) Reason added in v0.28.1

func (e AssetValidationError) Reason() string

Reason function returns reason value.

type BigInt

type BigInt struct {
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

BigInt represents a large number

func (*BigInt) Descriptor deprecated

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

Deprecated: Use BigInt.ProtoReflect.Descriptor instead.

func (*BigInt) GetValue

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

func (*BigInt) ProtoMessage

func (*BigInt) ProtoMessage()

func (*BigInt) ProtoReflect

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

func (*BigInt) Reset

func (x *BigInt) Reset()

func (*BigInt) String

func (x *BigInt) String() string

func (*BigInt) Validate

func (m *BigInt) Validate() error

Validate checks the field values on BigInt 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 (*BigInt) ValidateAll

func (m *BigInt) ValidateAll() error

ValidateAll checks the field values on BigInt 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 BigIntMultiError, or nil if none found.

type BigIntMultiError

type BigIntMultiError []error

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

func (BigIntMultiError) AllErrors

func (m BigIntMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BigIntMultiError) Error

func (m BigIntMultiError) Error() string

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

type BigIntValidationError

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

BigIntValidationError is the validation error returned by BigInt.Validate if the designated constraints aren't met.

func (BigIntValidationError) Cause

func (e BigIntValidationError) Cause() error

Cause function returns cause value.

func (BigIntValidationError) Error

func (e BigIntValidationError) Error() string

Error satisfies the builtin error interface

func (BigIntValidationError) ErrorName

func (e BigIntValidationError) ErrorName() string

ErrorName returns error name.

func (BigIntValidationError) Field

func (e BigIntValidationError) Field() string

Field function returns field value.

func (BigIntValidationError) Key

func (e BigIntValidationError) Key() bool

Key function returns key value.

func (BigIntValidationError) Reason

func (e BigIntValidationError) Reason() string

Reason function returns reason value.

type Body

type Body struct {
	Intents []*Intent `protobuf:"bytes,1,rep,name=intents,proto3" json:"intents,omitempty"` // A list of intents.
	// contains filtered or unexported fields
}

Message representing a body of intents.

func (*Body) Descriptor deprecated

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

Deprecated: Use Body.ProtoReflect.Descriptor instead.

func (*Body) GetIntents

func (x *Body) GetIntents() []*Intent

func (*Body) ProtoMessage

func (*Body) ProtoMessage()

func (*Body) ProtoReflect

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

func (*Body) Reset

func (x *Body) Reset()

func (*Body) String

func (x *Body) String() string

func (*Body) Validate

func (m *Body) Validate() error

Validate checks the field values on Body 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 (*Body) ValidateAll

func (m *Body) ValidateAll() error

ValidateAll checks the field values on Body 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 BodyMultiError, or nil if none found.

type BodyMultiError

type BodyMultiError []error

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

func (BodyMultiError) AllErrors

func (m BodyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BodyMultiError) Error

func (m BodyMultiError) Error() string

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

type BodyValidationError

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

BodyValidationError is the validation error returned by Body.Validate if the designated constraints aren't met.

func (BodyValidationError) Cause

func (e BodyValidationError) Cause() error

Cause function returns cause value.

func (BodyValidationError) Error

func (e BodyValidationError) Error() string

Error satisfies the builtin error interface

func (BodyValidationError) ErrorName

func (e BodyValidationError) ErrorName() string

ErrorName returns error name.

func (BodyValidationError) Field

func (e BodyValidationError) Field() string

Field function returns field value.

func (BodyValidationError) Key

func (e BodyValidationError) Key() bool

Key function returns key value.

func (BodyValidationError) Reason

func (e BodyValidationError) Reason() string

Reason function returns reason value.

type ExtraData

type ExtraData struct {
	PartiallyFillable *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=partially_fillable,json=partiallyFillable,proto3" json:"partially_fillable,omitempty"` // Indicates if the intent is partially fillable.
	// contains filtered or unexported fields
}

Message representing additional data for an intent.

func (*ExtraData) Descriptor deprecated

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

Deprecated: Use ExtraData.ProtoReflect.Descriptor instead.

func (*ExtraData) GetPartiallyFillable

func (x *ExtraData) GetPartiallyFillable() *wrapperspb.BoolValue

func (*ExtraData) ProtoMessage

func (*ExtraData) ProtoMessage()

func (*ExtraData) ProtoReflect

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

func (*ExtraData) Reset

func (x *ExtraData) Reset()

func (*ExtraData) String

func (x *ExtraData) String() string

func (*ExtraData) Validate

func (m *ExtraData) Validate() error

Validate checks the field values on ExtraData 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 (*ExtraData) ValidateAll

func (m *ExtraData) ValidateAll() error

ValidateAll checks the field values on ExtraData 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 ExtraDataMultiError, or nil if none found.

type ExtraDataMultiError

type ExtraDataMultiError []error

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

func (ExtraDataMultiError) AllErrors

func (m ExtraDataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ExtraDataMultiError) Error

func (m ExtraDataMultiError) Error() string

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

type ExtraDataValidationError

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

ExtraDataValidationError is the validation error returned by ExtraData.Validate if the designated constraints aren't met.

func (ExtraDataValidationError) Cause

func (e ExtraDataValidationError) Cause() error

Cause function returns cause value.

func (ExtraDataValidationError) Error

func (e ExtraDataValidationError) Error() string

Error satisfies the builtin error interface

func (ExtraDataValidationError) ErrorName

func (e ExtraDataValidationError) ErrorName() string

ErrorName returns error name.

func (ExtraDataValidationError) Field

func (e ExtraDataValidationError) Field() string

Field function returns field value.

func (ExtraDataValidationError) Key

Key function returns key value.

func (ExtraDataValidationError) Reason

func (e ExtraDataValidationError) Reason() string

Reason function returns reason value.

type Intent

type Intent struct {

	// Oneof field representing the asset being sent.
	//
	// Types that are assignable to From:
	//
	//	*Intent_FromAsset
	//	*Intent_FromStake
	//	*Intent_FromLoan
	From isIntent_From `protobuf_oneof:"from"`
	// Oneof field representing the asset being received.
	//
	// Types that are assignable to To:
	//
	//	*Intent_ToAsset
	//	*Intent_ToStake
	//	*Intent_ToLoan
	To isIntent_To `protobuf_oneof:"to"`
	// The recipient of the transfer, if different from the default
	Recipient *string          `protobuf:"bytes,8,opt,name=recipient,proto3,oneof" json:"recipient,omitempty"`
	ExtraData *ExtraData       `protobuf:"bytes,9,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`           // Additional data for the intent.
	Status    ProcessingStatus `protobuf:"varint,10,opt,name=status,proto3,enum=proto.v1.ProcessingStatus" json:"status,omitempty"` // The processing status of the intent.
	// The creation timestamp of the intent.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// when this intent expires
	ExpirationAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=expiration_at,json=expirationAt,proto3" json:"expiration_at,omitempty"`
	// contains filtered or unexported fields
}

Message representing an intent with various types of transactions.

func (*Intent) Descriptor deprecated

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

Deprecated: Use Intent.ProtoReflect.Descriptor instead.

func (*Intent) GetCreatedAt

func (x *Intent) GetCreatedAt() *timestamppb.Timestamp

func (*Intent) GetExpirationAt

func (x *Intent) GetExpirationAt() *timestamppb.Timestamp

func (*Intent) GetExtraData

func (x *Intent) GetExtraData() *ExtraData

func (*Intent) GetFrom

func (m *Intent) GetFrom() isIntent_From

func (*Intent) GetFromAsset

func (x *Intent) GetFromAsset() *Asset

func (*Intent) GetFromLoan

func (x *Intent) GetFromLoan() *Loan

func (*Intent) GetFromStake

func (x *Intent) GetFromStake() *Stake

func (*Intent) GetRecipient added in v0.43.0

func (x *Intent) GetRecipient() string

func (*Intent) GetStatus

func (x *Intent) GetStatus() ProcessingStatus

func (*Intent) GetTo

func (m *Intent) GetTo() isIntent_To

func (*Intent) GetToAsset

func (x *Intent) GetToAsset() *Asset

func (*Intent) GetToLoan

func (x *Intent) GetToLoan() *Loan

func (*Intent) GetToStake

func (x *Intent) GetToStake() *Stake

func (*Intent) ProtoMessage

func (*Intent) ProtoMessage()

func (*Intent) ProtoReflect

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

func (*Intent) Reset

func (x *Intent) Reset()

func (*Intent) String

func (x *Intent) String() string

func (*Intent) Validate

func (m *Intent) Validate() error

Validate checks the field values on Intent 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 (*Intent) ValidateAll

func (m *Intent) ValidateAll() error

ValidateAll checks the field values on Intent 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 IntentMultiError, or nil if none found.

type IntentMultiError

type IntentMultiError []error

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

func (IntentMultiError) AllErrors

func (m IntentMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (IntentMultiError) Error

func (m IntentMultiError) Error() string

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

type IntentValidationError

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

IntentValidationError is the validation error returned by Intent.Validate if the designated constraints aren't met.

func (IntentValidationError) Cause

func (e IntentValidationError) Cause() error

Cause function returns cause value.

func (IntentValidationError) Error

func (e IntentValidationError) Error() string

Error satisfies the builtin error interface

func (IntentValidationError) ErrorName

func (e IntentValidationError) ErrorName() string

ErrorName returns error name.

func (IntentValidationError) Field

func (e IntentValidationError) Field() string

Field function returns field value.

func (IntentValidationError) Key

func (e IntentValidationError) Key() bool

Key function returns key value.

func (IntentValidationError) Reason

func (e IntentValidationError) Reason() string

Reason function returns reason value.

type Intent_FromAsset

type Intent_FromAsset struct {
	FromAsset *Asset `protobuf:"bytes,2,opt,name=fromAsset,proto3,oneof"` // The asset being sent.
}

type Intent_FromLoan

type Intent_FromLoan struct {
	FromLoan *Loan `protobuf:"bytes,4,opt,name=fromLoan,proto3,oneof"` // The loan being sent.
}

type Intent_FromStake

type Intent_FromStake struct {
	FromStake *Stake `protobuf:"bytes,3,opt,name=fromStake,proto3,oneof"` // The stake being sent.
}

type Intent_ToAsset

type Intent_ToAsset struct {
	ToAsset *Asset `protobuf:"bytes,5,opt,name=toAsset,proto3,oneof"` // The token being received.
}

type Intent_ToLoan

type Intent_ToLoan struct {
	ToLoan *Loan `protobuf:"bytes,7,opt,name=toLoan,proto3,oneof"` // The loan being received.
}

type Intent_ToStake

type Intent_ToStake struct {
	ToStake *Stake `protobuf:"bytes,6,opt,name=toStake,proto3,oneof"` // The stake being received.
}

type Loan added in v0.28.1

type Loan struct {
	Asset   string  `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`                    // The asset associated with the loan.
	Amount  *BigInt `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`                  // The amount of the loan.
	Address string  `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`                // The address associated with the loan.
	ChainId *BigInt `protobuf:"bytes,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // The chain ID where the asset resides.
	// contains filtered or unexported fields
}

Message representing the details of a loan.

func (*Loan) Descriptor deprecated added in v0.28.1

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

Deprecated: Use Loan.ProtoReflect.Descriptor instead.

func (*Loan) GetAddress added in v0.28.1

func (x *Loan) GetAddress() string

func (*Loan) GetAmount added in v0.28.1

func (x *Loan) GetAmount() *BigInt

func (*Loan) GetAsset added in v0.28.1

func (x *Loan) GetAsset() string

func (*Loan) GetChainId added in v0.28.1

func (x *Loan) GetChainId() *BigInt

func (*Loan) ProtoMessage added in v0.28.1

func (*Loan) ProtoMessage()

func (*Loan) ProtoReflect added in v0.28.1

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

func (*Loan) Reset added in v0.28.1

func (x *Loan) Reset()

func (*Loan) String added in v0.28.1

func (x *Loan) String() string

func (*Loan) Validate added in v0.28.1

func (m *Loan) Validate() error

Validate checks the field values on Loan 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 (*Loan) ValidateAll added in v0.28.1

func (m *Loan) ValidateAll() error

ValidateAll checks the field values on Loan 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 LoanMultiError, or nil if none found.

type LoanMultiError added in v0.28.1

type LoanMultiError []error

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

func (LoanMultiError) AllErrors added in v0.28.1

func (m LoanMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoanMultiError) Error added in v0.28.1

func (m LoanMultiError) Error() string

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

type LoanValidationError added in v0.28.1

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

LoanValidationError is the validation error returned by Loan.Validate if the designated constraints aren't met.

func (LoanValidationError) Cause added in v0.28.1

func (e LoanValidationError) Cause() error

Cause function returns cause value.

func (LoanValidationError) Error added in v0.28.1

func (e LoanValidationError) Error() string

Error satisfies the builtin error interface

func (LoanValidationError) ErrorName added in v0.28.1

func (e LoanValidationError) ErrorName() string

ErrorName returns error name.

func (LoanValidationError) Field added in v0.28.1

func (e LoanValidationError) Field() string

Field function returns field value.

func (LoanValidationError) Key added in v0.28.1

func (e LoanValidationError) Key() bool

Key function returns key value.

func (LoanValidationError) Reason added in v0.28.1

func (e LoanValidationError) Reason() string

Reason function returns reason value.

type ProcessingStatus

type ProcessingStatus int32

Enum representing the processing status of an intent.

const (
	ProcessingStatus_PROCESSING_STATUS_UNSPECIFIED    ProcessingStatus = 0 // Default value, unspecified processing status.
	ProcessingStatus_PROCESSING_STATUS_RECEIVED       ProcessingStatus = 1 // Intent has been received.
	ProcessingStatus_PROCESSING_STATUS_SENT_TO_SOLVER ProcessingStatus = 2 // Intent has been sent to the solver.
	ProcessingStatus_PROCESSING_STATUS_SOLVED         ProcessingStatus = 3 // Intent has been solved.
	ProcessingStatus_PROCESSING_STATUS_UNSOLVED       ProcessingStatus = 4 // Intent remains unsolved.
	ProcessingStatus_PROCESSING_STATUS_EXPIRED        ProcessingStatus = 5 // Intent has expired.
	ProcessingStatus_PROCESSING_STATUS_ON_CHAIN       ProcessingStatus = 6 // Intent is on the blockchain.
	ProcessingStatus_PROCESSING_STATUS_INVALID        ProcessingStatus = 7 // Intent is invalid.
)

func (ProcessingStatus) Descriptor

func (ProcessingStatus) Enum

func (ProcessingStatus) EnumDescriptor deprecated

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

Deprecated: Use ProcessingStatus.Descriptor instead.

func (ProcessingStatus) Number

func (ProcessingStatus) String

func (x ProcessingStatus) String() string

func (ProcessingStatus) Type

type Stake added in v0.28.1

type Stake struct {
	Address string  `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`                // The address of the stake.
	Amount  *BigInt `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`                  // The amount of the stake.
	ChainId *BigInt `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // The chain ID where the asset resides.
	// contains filtered or unexported fields
}

Message representing the details of a stake.

func (*Stake) Descriptor deprecated added in v0.28.1

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

Deprecated: Use Stake.ProtoReflect.Descriptor instead.

func (*Stake) GetAddress added in v0.28.1

func (x *Stake) GetAddress() string

func (*Stake) GetAmount added in v0.28.1

func (x *Stake) GetAmount() *BigInt

func (*Stake) GetChainId added in v0.28.1

func (x *Stake) GetChainId() *BigInt

func (*Stake) ProtoMessage added in v0.28.1

func (*Stake) ProtoMessage()

func (*Stake) ProtoReflect added in v0.28.1

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

func (*Stake) Reset added in v0.28.1

func (x *Stake) Reset()

func (*Stake) String added in v0.28.1

func (x *Stake) String() string

func (*Stake) Validate added in v0.28.1

func (m *Stake) Validate() error

Validate checks the field values on Stake 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 (*Stake) ValidateAll added in v0.28.1

func (m *Stake) ValidateAll() error

ValidateAll checks the field values on Stake 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 StakeMultiError, or nil if none found.

type StakeMultiError added in v0.28.1

type StakeMultiError []error

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

func (StakeMultiError) AllErrors added in v0.28.1

func (m StakeMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (StakeMultiError) Error added in v0.28.1

func (m StakeMultiError) Error() string

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

type StakeValidationError added in v0.28.1

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

StakeValidationError is the validation error returned by Stake.Validate if the designated constraints aren't met.

func (StakeValidationError) Cause added in v0.28.1

func (e StakeValidationError) Cause() error

Cause function returns cause value.

func (StakeValidationError) Error added in v0.28.1

func (e StakeValidationError) Error() string

Error satisfies the builtin error interface

func (StakeValidationError) ErrorName added in v0.28.1

func (e StakeValidationError) ErrorName() string

ErrorName returns error name.

func (StakeValidationError) Field added in v0.28.1

func (e StakeValidationError) Field() string

Field function returns field value.

func (StakeValidationError) Key added in v0.28.1

func (e StakeValidationError) Key() bool

Key function returns key value.

func (StakeValidationError) Reason added in v0.28.1

func (e StakeValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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