base

package
v0.0.0-...-57fd995 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_base_response_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Error

type Error 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"`
	Detail  *anypb.Any `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
	// contains filtered or unexported fields
}

Error 错误消息定义

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetDetail

func (x *Error) GetDetail() *anypb.Any

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

func (*Error) Validate

func (m *Error) Validate() error

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

func (m *Error) ValidateAll() error

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

type ErrorMultiError

type ErrorMultiError []error

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

func (ErrorMultiError) AllErrors

func (m ErrorMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ErrorMultiError) Error

func (m ErrorMultiError) Error() string

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

type ErrorValidationError

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

ErrorValidationError is the validation error returned by Error.Validate if the designated constraints aren't met.

func (ErrorValidationError) Cause

func (e ErrorValidationError) Cause() error

Cause function returns cause value.

func (ErrorValidationError) Error

func (e ErrorValidationError) Error() string

Error satisfies the builtin error interface

func (ErrorValidationError) ErrorName

func (e ErrorValidationError) ErrorName() string

ErrorName returns error name.

func (ErrorValidationError) Field

func (e ErrorValidationError) Field() string

Field function returns field value.

func (ErrorValidationError) Key

func (e ErrorValidationError) Key() bool

Key function returns key value.

func (ErrorValidationError) Reason

func (e ErrorValidationError) Reason() string

Reason function returns reason value.

type PageReq

type PageReq struct {
	Limit  int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

PageReq 分页请求

func (*PageReq) Descriptor deprecated

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

Deprecated: Use PageReq.ProtoReflect.Descriptor instead.

func (*PageReq) GetLimit

func (x *PageReq) GetLimit() int64

func (*PageReq) GetOffset

func (x *PageReq) GetOffset() int64

func (*PageReq) ProtoMessage

func (*PageReq) ProtoMessage()

func (*PageReq) ProtoReflect

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

func (*PageReq) Reset

func (x *PageReq) Reset()

func (*PageReq) String

func (x *PageReq) String() string

func (*PageReq) Validate

func (m *PageReq) Validate() error

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

func (m *PageReq) ValidateAll() error

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

type PageReqMultiError

type PageReqMultiError []error

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

func (PageReqMultiError) AllErrors

func (m PageReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PageReqMultiError) Error

func (m PageReqMultiError) Error() string

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

type PageReqValidationError

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

PageReqValidationError is the validation error returned by PageReq.Validate if the designated constraints aren't met.

func (PageReqValidationError) Cause

func (e PageReqValidationError) Cause() error

Cause function returns cause value.

func (PageReqValidationError) Error

func (e PageReqValidationError) Error() string

Error satisfies the builtin error interface

func (PageReqValidationError) ErrorName

func (e PageReqValidationError) ErrorName() string

ErrorName returns error name.

func (PageReqValidationError) Field

func (e PageReqValidationError) Field() string

Field function returns field value.

func (PageReqValidationError) Key

func (e PageReqValidationError) Key() bool

Key function returns key value.

func (PageReqValidationError) Reason

func (e PageReqValidationError) Reason() string

Reason function returns reason value.

type PageRes

type PageRes struct {
	Total       int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	CurrentPage int64 `protobuf:"varint,2,opt,name=current_page,json=currentPage,proto3" json:"current_page,omitempty"`
	TotalPage   int64 `protobuf:"varint,3,opt,name=total_page,json=totalPage,proto3" json:"total_page,omitempty"`
	PageSize    int64 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

PageRes 分页请求返回

func (*PageRes) Descriptor deprecated

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

Deprecated: Use PageRes.ProtoReflect.Descriptor instead.

func (*PageRes) GetCurrentPage

func (x *PageRes) GetCurrentPage() int64

func (*PageRes) GetPageSize

func (x *PageRes) GetPageSize() int64

func (*PageRes) GetTotal

func (x *PageRes) GetTotal() int64

func (*PageRes) GetTotalPage

func (x *PageRes) GetTotalPage() int64

func (*PageRes) ProtoMessage

func (*PageRes) ProtoMessage()

func (*PageRes) ProtoReflect

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

func (*PageRes) Reset

func (x *PageRes) Reset()

func (*PageRes) String

func (x *PageRes) String() string

func (*PageRes) Validate

func (m *PageRes) Validate() error

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

func (m *PageRes) ValidateAll() error

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

type PageResMultiError

type PageResMultiError []error

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

func (PageResMultiError) AllErrors

func (m PageResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PageResMultiError) Error

func (m PageResMultiError) Error() string

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

type PageResValidationError

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

PageResValidationError is the validation error returned by PageRes.Validate if the designated constraints aren't met.

func (PageResValidationError) Cause

func (e PageResValidationError) Cause() error

Cause function returns cause value.

func (PageResValidationError) Error

func (e PageResValidationError) Error() string

Error satisfies the builtin error interface

func (PageResValidationError) ErrorName

func (e PageResValidationError) ErrorName() string

ErrorName returns error name.

func (PageResValidationError) Field

func (e PageResValidationError) Field() string

Field function returns field value.

func (PageResValidationError) Key

func (e PageResValidationError) Key() bool

Key function returns key value.

func (PageResValidationError) Reason

func (e PageResValidationError) 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