common

package
v0.0.0-...-96f2668 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_common_common_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Result

type Result struct {
	Code    int32      `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string     `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Result  *anypb.Any `protobuf:"bytes,3,opt,name=result,proto3,oneof" json:"result,omitempty"`
	Type    string     `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

通用返回

func (*Result) Descriptor deprecated

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetCode

func (x *Result) GetCode() int32

func (*Result) GetMessage

func (x *Result) GetMessage() string

func (*Result) GetResult

func (x *Result) GetResult() *anypb.Any

func (*Result) GetType

func (x *Result) GetType() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

func (*Result) Validate

func (m *Result) Validate() error

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

func (m *Result) ValidateAll() error

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

type ResultData

type ResultData struct {
	Id   uint64            `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Data map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

通用返回数据

func (*ResultData) Descriptor deprecated

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

Deprecated: Use ResultData.ProtoReflect.Descriptor instead.

func (*ResultData) GetData

func (x *ResultData) GetData() map[string]string

func (*ResultData) GetId

func (x *ResultData) GetId() uint64

func (*ResultData) ProtoMessage

func (*ResultData) ProtoMessage()

func (*ResultData) ProtoReflect

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

func (*ResultData) Reset

func (x *ResultData) Reset()

func (*ResultData) String

func (x *ResultData) String() string

func (*ResultData) Validate

func (m *ResultData) Validate() error

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

func (m *ResultData) ValidateAll() error

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

type ResultDataMultiError

type ResultDataMultiError []error

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

func (ResultDataMultiError) AllErrors

func (m ResultDataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ResultDataMultiError) Error

func (m ResultDataMultiError) Error() string

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

type ResultDataValidationError

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

ResultDataValidationError is the validation error returned by ResultData.Validate if the designated constraints aren't met.

func (ResultDataValidationError) Cause

func (e ResultDataValidationError) Cause() error

Cause function returns cause value.

func (ResultDataValidationError) Error

Error satisfies the builtin error interface

func (ResultDataValidationError) ErrorName

func (e ResultDataValidationError) ErrorName() string

ErrorName returns error name.

func (ResultDataValidationError) Field

Field function returns field value.

func (ResultDataValidationError) Key

Key function returns key value.

func (ResultDataValidationError) Reason

func (e ResultDataValidationError) Reason() string

Reason function returns reason value.

type ResultMultiError

type ResultMultiError []error

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

func (ResultMultiError) AllErrors

func (m ResultMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ResultMultiError) Error

func (m ResultMultiError) Error() string

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

type ResultValidationError

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

ResultValidationError is the validation error returned by Result.Validate if the designated constraints aren't met.

func (ResultValidationError) Cause

func (e ResultValidationError) Cause() error

Cause function returns cause value.

func (ResultValidationError) Error

func (e ResultValidationError) Error() string

Error satisfies the builtin error interface

func (ResultValidationError) ErrorName

func (e ResultValidationError) ErrorName() string

ErrorName returns error name.

func (ResultValidationError) Field

func (e ResultValidationError) Field() string

Field function returns field value.

func (ResultValidationError) Key

func (e ResultValidationError) Key() bool

Key function returns key value.

func (ResultValidationError) Reason

func (e ResultValidationError) Reason() string

Reason function returns reason value.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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