v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExampleService_GetExampleList_FullMethodName = "/example.v1.ExampleService/GetExampleList"
	ExampleService_GetExample_FullMethodName     = "/example.v1.ExampleService/GetExample"
	ExampleService_CreateExample_FullMethodName  = "/example.v1.ExampleService/CreateExample"
	ExampleService_UpdateExample_FullMethodName  = "/example.v1.ExampleService/UpdateExample"
	ExampleService_DeleteExample_FullMethodName  = "/example.v1.ExampleService/DeleteExample"
	ExampleService_RecoverExample_FullMethodName = "/example.v1.ExampleService/RecoverExample"
)
View Source
const OperationExampleServiceCreateExample = "/example.v1.ExampleService/CreateExample"
View Source
const OperationExampleServiceDeleteExample = "/example.v1.ExampleService/DeleteExample"
View Source
const OperationExampleServiceGetExample = "/example.v1.ExampleService/GetExample"
View Source
const OperationExampleServiceGetExampleList = "/example.v1.ExampleService/GetExampleList"
View Source
const OperationExampleServiceRecoverExample = "/example.v1.ExampleService/RecoverExample"
View Source
const OperationExampleServiceUpdateExample = "/example.v1.ExampleService/UpdateExample"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "RECORD_NOT_FOUND",
		1: "RECORD_ALREADY_EXISTS",
		2: "BAD_REQUEST",
		3: "SYSTEM_ERROR",
	}
	ErrorReason_value = map[string]int32{
		"RECORD_NOT_FOUND":      0,
		"RECORD_ALREADY_EXISTS": 1,
		"BAD_REQUEST":           2,
		"SYSTEM_ERROR":          3,
	}
)

Enum value maps for ErrorReason.

View Source
var ExampleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "example.v1.ExampleService",
	HandlerType: (*ExampleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetExampleList",
			Handler:    _ExampleService_GetExampleList_Handler,
		},
		{
			MethodName: "GetExample",
			Handler:    _ExampleService_GetExample_Handler,
		},
		{
			MethodName: "CreateExample",
			Handler:    _ExampleService_CreateExample_Handler,
		},
		{
			MethodName: "UpdateExample",
			Handler:    _ExampleService_UpdateExample_Handler,
		},
		{
			MethodName: "DeleteExample",
			Handler:    _ExampleService_DeleteExample_Handler,
		},
		{
			MethodName: "RecoverExample",
			Handler:    _ExampleService_RecoverExample_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "example/v1/example.proto",
}

ExampleService_ServiceDesc is the grpc.ServiceDesc for ExampleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_example_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_example_v1_example_proto protoreflect.FileDescriptor

Functions

func ErrorBadRequest

func ErrorBadRequest(format string, args ...interface{}) *errors.Error

func ErrorRecordAlreadyExists

func ErrorRecordAlreadyExists(format string, args ...interface{}) *errors.Error

func ErrorRecordNotFound

func ErrorRecordNotFound(format string, args ...interface{}) *errors.Error

func ErrorSystemError

func ErrorSystemError(format string, args ...interface{}) *errors.Error

func IsBadRequest

func IsBadRequest(err error) bool

func IsRecordAlreadyExists

func IsRecordAlreadyExists(err error) bool

func IsRecordNotFound

func IsRecordNotFound(err error) bool

func IsSystemError

func IsSystemError(err error) bool

func RegisterExampleServiceHTTPServer

func RegisterExampleServiceHTTPServer(s *http.Server, srv ExampleServiceHTTPServer)

func RegisterExampleServiceServer

func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)

Types

type CheckResponse

type CheckResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

响应 - 检查是否处理成功

func (*CheckResponse) Descriptor deprecated

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

Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.

func (*CheckResponse) GetSuccess

func (x *CheckResponse) GetSuccess() bool

func (*CheckResponse) ProtoMessage

func (*CheckResponse) ProtoMessage()

func (*CheckResponse) ProtoReflect

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

func (*CheckResponse) Reset

func (x *CheckResponse) Reset()

func (*CheckResponse) String

func (x *CheckResponse) String() string

func (*CheckResponse) Validate

func (m *CheckResponse) Validate() error

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

func (m *CheckResponse) ValidateAll() error

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

type CheckResponseMultiError

type CheckResponseMultiError []error

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

func (CheckResponseMultiError) AllErrors

func (m CheckResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CheckResponseMultiError) Error

func (m CheckResponseMultiError) Error() string

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

type CheckResponseValidationError

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

CheckResponseValidationError is the validation error returned by CheckResponse.Validate if the designated constraints aren't met.

func (CheckResponseValidationError) Cause

Cause function returns cause value.

func (CheckResponseValidationError) Error

Error satisfies the builtin error interface

func (CheckResponseValidationError) ErrorName

func (e CheckResponseValidationError) ErrorName() string

ErrorName returns error name.

func (CheckResponseValidationError) Field

Field function returns field value.

func (CheckResponseValidationError) Key

Key function returns key value.

func (CheckResponseValidationError) Reason

Reason function returns reason value.

type CreateExampleReq

type CreateExampleReq struct {

	// 名称
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Status bool   `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

请求 - 创建

func (*CreateExampleReq) Descriptor deprecated

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

Deprecated: Use CreateExampleReq.ProtoReflect.Descriptor instead.

func (*CreateExampleReq) GetName

func (x *CreateExampleReq) GetName() string

func (*CreateExampleReq) GetStatus

func (x *CreateExampleReq) GetStatus() bool

func (*CreateExampleReq) ProtoMessage

func (*CreateExampleReq) ProtoMessage()

func (*CreateExampleReq) ProtoReflect

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

func (*CreateExampleReq) Reset

func (x *CreateExampleReq) Reset()

func (*CreateExampleReq) String

func (x *CreateExampleReq) String() string

func (*CreateExampleReq) Validate

func (m *CreateExampleReq) Validate() error

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

func (m *CreateExampleReq) ValidateAll() error

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

type CreateExampleReqMultiError

type CreateExampleReqMultiError []error

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

func (CreateExampleReqMultiError) AllErrors

func (m CreateExampleReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateExampleReqMultiError) Error

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

type CreateExampleReqValidationError

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

CreateExampleReqValidationError is the validation error returned by CreateExampleReq.Validate if the designated constraints aren't met.

func (CreateExampleReqValidationError) Cause

Cause function returns cause value.

func (CreateExampleReqValidationError) Error

Error satisfies the builtin error interface

func (CreateExampleReqValidationError) ErrorName

ErrorName returns error name.

func (CreateExampleReqValidationError) Field

Field function returns field value.

func (CreateExampleReqValidationError) Key

Key function returns key value.

func (CreateExampleReqValidationError) Reason

Reason function returns reason value.

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_RECORD_NOT_FOUND      ErrorReason = 0
	ErrorReason_RECORD_ALREADY_EXISTS ErrorReason = 1
	ErrorReason_BAD_REQUEST           ErrorReason = 2
	ErrorReason_SYSTEM_ERROR          ErrorReason = 3
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type Example

type Example struct {

	// 主键id
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 名称
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// 状态
	Status bool `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	// 创建时间
	CreateAt string `protobuf:"bytes,4,opt,name=create_at,json=created_at,proto3" json:"create_at,omitempty"`
	// 更新时间
	UpdateAt string `protobuf:"bytes,5,opt,name=update_at,json=updated_at,proto3" json:"update_at,omitempty"`
	// contains filtered or unexported fields
}

响应 - 示例信息

func (*Example) Descriptor deprecated

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

Deprecated: Use Example.ProtoReflect.Descriptor instead.

func (*Example) GetCreateAt

func (x *Example) GetCreateAt() string

func (*Example) GetId

func (x *Example) GetId() int64

func (*Example) GetName

func (x *Example) GetName() string

func (*Example) GetStatus

func (x *Example) GetStatus() bool

func (*Example) GetUpdateAt

func (x *Example) GetUpdateAt() string

func (*Example) ProtoMessage

func (*Example) ProtoMessage()

func (*Example) ProtoReflect

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

func (*Example) Reset

func (x *Example) Reset()

func (*Example) String

func (x *Example) String() string

func (*Example) Validate

func (m *Example) Validate() error

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

func (m *Example) ValidateAll() error

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

type ExampleIdReq

type ExampleIdReq struct {

	// 主键id
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

请求 - 主键id

func (*ExampleIdReq) Descriptor deprecated

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

Deprecated: Use ExampleIdReq.ProtoReflect.Descriptor instead.

func (*ExampleIdReq) GetId

func (x *ExampleIdReq) GetId() int64

func (*ExampleIdReq) ProtoMessage

func (*ExampleIdReq) ProtoMessage()

func (*ExampleIdReq) ProtoReflect

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

func (*ExampleIdReq) Reset

func (x *ExampleIdReq) Reset()

func (*ExampleIdReq) String

func (x *ExampleIdReq) String() string

func (*ExampleIdReq) Validate

func (m *ExampleIdReq) Validate() error

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

func (m *ExampleIdReq) ValidateAll() error

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

type ExampleIdReqMultiError

type ExampleIdReqMultiError []error

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

func (ExampleIdReqMultiError) AllErrors

func (m ExampleIdReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ExampleIdReqMultiError) Error

func (m ExampleIdReqMultiError) Error() string

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

type ExampleIdReqValidationError

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

ExampleIdReqValidationError is the validation error returned by ExampleIdReq.Validate if the designated constraints aren't met.

func (ExampleIdReqValidationError) Cause

Cause function returns cause value.

func (ExampleIdReqValidationError) Error

Error satisfies the builtin error interface

func (ExampleIdReqValidationError) ErrorName

func (e ExampleIdReqValidationError) ErrorName() string

ErrorName returns error name.

func (ExampleIdReqValidationError) Field

Field function returns field value.

func (ExampleIdReqValidationError) Key

Key function returns key value.

func (ExampleIdReqValidationError) Reason

Reason function returns reason value.

type ExampleMultiError

type ExampleMultiError []error

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

func (ExampleMultiError) AllErrors

func (m ExampleMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ExampleMultiError) Error

func (m ExampleMultiError) Error() string

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

type ExampleServiceClient

type ExampleServiceClient interface {
	// 列表
	GetExampleList(ctx context.Context, in *GetExampleListReq, opts ...grpc.CallOption) (*GetExampleListPageRes, error)
	// 详情
	GetExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*Example, error)
	// 创建
	CreateExample(ctx context.Context, in *CreateExampleReq, opts ...grpc.CallOption) (*Example, error)
	// 更新
	UpdateExample(ctx context.Context, in *UpdateExampleReq, opts ...grpc.CallOption) (*CheckResponse, error)
	// 删除
	DeleteExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*CheckResponse, error)
	// 恢复
	RecoverExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*CheckResponse, error)
}

ExampleServiceClient is the client API for ExampleService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ExampleServiceHTTPClient

type ExampleServiceHTTPClient interface {
	CreateExample(ctx context.Context, req *CreateExampleReq, opts ...http.CallOption) (rsp *Example, err error)
	DeleteExample(ctx context.Context, req *ExampleIdReq, opts ...http.CallOption) (rsp *CheckResponse, err error)
	GetExample(ctx context.Context, req *ExampleIdReq, opts ...http.CallOption) (rsp *Example, err error)
	GetExampleList(ctx context.Context, req *GetExampleListReq, opts ...http.CallOption) (rsp *GetExampleListPageRes, err error)
	RecoverExample(ctx context.Context, req *ExampleIdReq, opts ...http.CallOption) (rsp *CheckResponse, err error)
	UpdateExample(ctx context.Context, req *UpdateExampleReq, opts ...http.CallOption) (rsp *CheckResponse, err error)
}

func NewExampleServiceHTTPClient

func NewExampleServiceHTTPClient(client *http.Client) ExampleServiceHTTPClient

type ExampleServiceHTTPClientImpl

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

func (*ExampleServiceHTTPClientImpl) CreateExample

func (c *ExampleServiceHTTPClientImpl) CreateExample(ctx context.Context, in *CreateExampleReq, opts ...http.CallOption) (*Example, error)

func (*ExampleServiceHTTPClientImpl) DeleteExample

func (*ExampleServiceHTTPClientImpl) GetExample

func (*ExampleServiceHTTPClientImpl) GetExampleList

func (*ExampleServiceHTTPClientImpl) RecoverExample

func (*ExampleServiceHTTPClientImpl) UpdateExample

type ExampleServiceHTTPServer

type ExampleServiceHTTPServer interface {
	CreateExample(context.Context, *CreateExampleReq) (*Example, error)
	DeleteExample(context.Context, *ExampleIdReq) (*CheckResponse, error)
	GetExample(context.Context, *ExampleIdReq) (*Example, error)
	GetExampleList(context.Context, *GetExampleListReq) (*GetExampleListPageRes, error)
	RecoverExample(context.Context, *ExampleIdReq) (*CheckResponse, error)
	UpdateExample(context.Context, *UpdateExampleReq) (*CheckResponse, error)
}

type ExampleServiceServer

type ExampleServiceServer interface {
	// 列表
	GetExampleList(context.Context, *GetExampleListReq) (*GetExampleListPageRes, error)
	// 详情
	GetExample(context.Context, *ExampleIdReq) (*Example, error)
	// 创建
	CreateExample(context.Context, *CreateExampleReq) (*Example, error)
	// 更新
	UpdateExample(context.Context, *UpdateExampleReq) (*CheckResponse, error)
	// 删除
	DeleteExample(context.Context, *ExampleIdReq) (*CheckResponse, error)
	// 恢复
	RecoverExample(context.Context, *ExampleIdReq) (*CheckResponse, error)
	// contains filtered or unexported methods
}

ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility

type ExampleValidationError

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

ExampleValidationError is the validation error returned by Example.Validate if the designated constraints aren't met.

func (ExampleValidationError) Cause

func (e ExampleValidationError) Cause() error

Cause function returns cause value.

func (ExampleValidationError) Error

func (e ExampleValidationError) Error() string

Error satisfies the builtin error interface

func (ExampleValidationError) ErrorName

func (e ExampleValidationError) ErrorName() string

ErrorName returns error name.

func (ExampleValidationError) Field

func (e ExampleValidationError) Field() string

Field function returns field value.

func (ExampleValidationError) Key

func (e ExampleValidationError) Key() bool

Key function returns key value.

func (ExampleValidationError) Reason

func (e ExampleValidationError) Reason() string

Reason function returns reason value.

type GetExampleListPageRes

type GetExampleListPageRes struct {

	// 总数
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	// 列表
	List []*Example `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

响应 - 分页

func (*GetExampleListPageRes) Descriptor deprecated

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

Deprecated: Use GetExampleListPageRes.ProtoReflect.Descriptor instead.

func (*GetExampleListPageRes) GetList

func (x *GetExampleListPageRes) GetList() []*Example

func (*GetExampleListPageRes) GetTotal

func (x *GetExampleListPageRes) GetTotal() int64

func (*GetExampleListPageRes) ProtoMessage

func (*GetExampleListPageRes) ProtoMessage()

func (*GetExampleListPageRes) ProtoReflect

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

func (*GetExampleListPageRes) Reset

func (x *GetExampleListPageRes) Reset()

func (*GetExampleListPageRes) String

func (x *GetExampleListPageRes) String() string

func (*GetExampleListPageRes) Validate

func (m *GetExampleListPageRes) Validate() error

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

func (m *GetExampleListPageRes) ValidateAll() error

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

type GetExampleListPageResMultiError

type GetExampleListPageResMultiError []error

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

func (GetExampleListPageResMultiError) AllErrors

func (m GetExampleListPageResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetExampleListPageResMultiError) Error

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

type GetExampleListPageResValidationError

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

GetExampleListPageResValidationError is the validation error returned by GetExampleListPageRes.Validate if the designated constraints aren't met.

func (GetExampleListPageResValidationError) Cause

Cause function returns cause value.

func (GetExampleListPageResValidationError) Error

Error satisfies the builtin error interface

func (GetExampleListPageResValidationError) ErrorName

ErrorName returns error name.

func (GetExampleListPageResValidationError) Field

Field function returns field value.

func (GetExampleListPageResValidationError) Key

Key function returns key value.

func (GetExampleListPageResValidationError) Reason

Reason function returns reason value.

type GetExampleListReq

type GetExampleListReq struct {

	// 主键id
	Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	// 页记录数
	PageSize int64 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	// 名称
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// 状态 true正常 false冻结
	Status *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

请求 - 分页列表

func (*GetExampleListReq) Descriptor deprecated

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

Deprecated: Use GetExampleListReq.ProtoReflect.Descriptor instead.

func (*GetExampleListReq) GetName

func (x *GetExampleListReq) GetName() string

func (*GetExampleListReq) GetPage

func (x *GetExampleListReq) GetPage() int64

func (*GetExampleListReq) GetPageSize

func (x *GetExampleListReq) GetPageSize() int64

func (*GetExampleListReq) GetStatus

func (x *GetExampleListReq) GetStatus() *wrapperspb.BoolValue

func (*GetExampleListReq) ProtoMessage

func (*GetExampleListReq) ProtoMessage()

func (*GetExampleListReq) ProtoReflect

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

func (*GetExampleListReq) Reset

func (x *GetExampleListReq) Reset()

func (*GetExampleListReq) String

func (x *GetExampleListReq) String() string

func (*GetExampleListReq) Validate

func (m *GetExampleListReq) Validate() error

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

func (m *GetExampleListReq) ValidateAll() error

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

type GetExampleListReqMultiError

type GetExampleListReqMultiError []error

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

func (GetExampleListReqMultiError) AllErrors

func (m GetExampleListReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetExampleListReqMultiError) Error

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

type GetExampleListReqValidationError

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

GetExampleListReqValidationError is the validation error returned by GetExampleListReq.Validate if the designated constraints aren't met.

func (GetExampleListReqValidationError) Cause

Cause function returns cause value.

func (GetExampleListReqValidationError) Error

Error satisfies the builtin error interface

func (GetExampleListReqValidationError) ErrorName

ErrorName returns error name.

func (GetExampleListReqValidationError) Field

Field function returns field value.

func (GetExampleListReqValidationError) Key

Key function returns key value.

func (GetExampleListReqValidationError) Reason

Reason function returns reason value.

type UnimplementedExampleServiceServer

type UnimplementedExampleServiceServer struct {
}

UnimplementedExampleServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedExampleServiceServer) CreateExample

func (UnimplementedExampleServiceServer) DeleteExample

func (UnimplementedExampleServiceServer) GetExample

func (UnimplementedExampleServiceServer) GetExampleList

func (UnimplementedExampleServiceServer) RecoverExample

func (UnimplementedExampleServiceServer) UpdateExample

type UnsafeExampleServiceServer

type UnsafeExampleServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeExampleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServiceServer will result in compilation errors.

type UpdateExampleReq

type UpdateExampleReq struct {

	// 主键id
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 名称
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// 状态
	Status bool `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

请求 - 更新

func (*UpdateExampleReq) Descriptor deprecated

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

Deprecated: Use UpdateExampleReq.ProtoReflect.Descriptor instead.

func (*UpdateExampleReq) GetId

func (x *UpdateExampleReq) GetId() int64

func (*UpdateExampleReq) GetName

func (x *UpdateExampleReq) GetName() string

func (*UpdateExampleReq) GetStatus

func (x *UpdateExampleReq) GetStatus() bool

func (*UpdateExampleReq) ProtoMessage

func (*UpdateExampleReq) ProtoMessage()

func (*UpdateExampleReq) ProtoReflect

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

func (*UpdateExampleReq) Reset

func (x *UpdateExampleReq) Reset()

func (*UpdateExampleReq) String

func (x *UpdateExampleReq) String() string

func (*UpdateExampleReq) Validate

func (m *UpdateExampleReq) Validate() error

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

func (m *UpdateExampleReq) ValidateAll() error

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

type UpdateExampleReqMultiError

type UpdateExampleReqMultiError []error

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

func (UpdateExampleReqMultiError) AllErrors

func (m UpdateExampleReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateExampleReqMultiError) Error

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

type UpdateExampleReqValidationError

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

UpdateExampleReqValidationError is the validation error returned by UpdateExampleReq.Validate if the designated constraints aren't met.

func (UpdateExampleReqValidationError) Cause

Cause function returns cause value.

func (UpdateExampleReqValidationError) Error

Error satisfies the builtin error interface

func (UpdateExampleReqValidationError) ErrorName

ErrorName returns error name.

func (UpdateExampleReqValidationError) Field

Field function returns field value.

func (UpdateExampleReqValidationError) Key

Key function returns key value.

func (UpdateExampleReqValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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