v1

package
v0.0.0-...-808d8e6 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 28 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 CreateExampleReq

type CreateExampleReq struct {

	// name
	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
}

Request - Create

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 {

	// Primary key id
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// state
	Status bool `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	// Creation time
	CreatedAt string `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Update time
	UpdatedAt string `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// Delete time
	DeletedAt string `protobuf:"bytes,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

Response - Sample message

func (*Example) Descriptor deprecated

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

Deprecated: Use Example.ProtoReflect.Descriptor instead.

func (*Example) GetCreatedAt

func (x *Example) GetCreatedAt() string

func (*Example) GetDeletedAt

func (x *Example) GetDeletedAt() 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) GetUpdatedAt

func (x *Example) GetUpdatedAt() 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 {

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

Request - Primary key 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 {
	// List
	GetExampleList(ctx context.Context, in *GetExampleListReq, opts ...grpc.CallOption) (*GetExampleListPageRes, error)
	// Details
	GetExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*Example, error)
	// create
	CreateExample(ctx context.Context, in *CreateExampleReq, opts ...grpc.CallOption) (*Example, error)
	// renew
	UpdateExample(ctx context.Context, in *UpdateExampleReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// delete
	DeleteExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// recover
	RecoverExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*emptypb.Empty, 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.

Sample Service

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 *emptypb.Empty, 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 *emptypb.Empty, err error)
	UpdateExample(ctx context.Context, req *UpdateExampleReq, opts ...http.CallOption) (rsp *emptypb.Empty, 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 (c *ExampleServiceHTTPClientImpl) DeleteExample(ctx context.Context, in *ExampleIdReq, opts ...http.CallOption) (*emptypb.Empty, error)

func (*ExampleServiceHTTPClientImpl) GetExample

func (*ExampleServiceHTTPClientImpl) GetExampleList

func (*ExampleServiceHTTPClientImpl) RecoverExample

func (c *ExampleServiceHTTPClientImpl) RecoverExample(ctx context.Context, in *ExampleIdReq, opts ...http.CallOption) (*emptypb.Empty, error)

func (*ExampleServiceHTTPClientImpl) UpdateExample

type ExampleServiceHTTPServer

type ExampleServiceHTTPServer interface {
	// CreateExample create
	CreateExample(context.Context, *CreateExampleReq) (*Example, error)
	// DeleteExample delete
	DeleteExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error)
	// GetExample Details
	GetExample(context.Context, *ExampleIdReq) (*Example, error)
	// GetExampleList List
	GetExampleList(context.Context, *GetExampleListReq) (*GetExampleListPageRes, error)
	// RecoverExample recover
	RecoverExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error)
	// UpdateExample renew
	UpdateExample(context.Context, *UpdateExampleReq) (*emptypb.Empty, error)
}

type ExampleServiceServer

type ExampleServiceServer interface {
	// List
	GetExampleList(context.Context, *GetExampleListReq) (*GetExampleListPageRes, error)
	// Details
	GetExample(context.Context, *ExampleIdReq) (*Example, error)
	// create
	CreateExample(context.Context, *CreateExampleReq) (*Example, error)
	// renew
	UpdateExample(context.Context, *UpdateExampleReq) (*emptypb.Empty, error)
	// delete
	DeleteExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error)
	// recover
	RecoverExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

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

Sample Service

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
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	// List
	List []*Example `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

Response - Pagination

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 {

	// Primary key id
	Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	// Page Records
	PageSize int64 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	// name
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Status true normal false frozen
	Status *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
	// Delete
	IsDeleted *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=is_deleted,json=isDeleted,proto3" json:"is_deleted,omitempty"`
	// Creation start time
	CreatedAtStart string `protobuf:"bytes,6,opt,name=created_at_start,json=createdAtStart,proto3" json:"created_at_start,omitempty"`
	// Creation end time
	CreatedAtEnd string `protobuf:"bytes,7,opt,name=created_at_end,json=createdAtEnd,proto3" json:"created_at_end,omitempty"`
	// contains filtered or unexported fields
}

Requests - Paginated List

func (*GetExampleListReq) Descriptor deprecated

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

Deprecated: Use GetExampleListReq.ProtoReflect.Descriptor instead.

func (*GetExampleListReq) GetCreatedAtEnd

func (x *GetExampleListReq) GetCreatedAtEnd() string

func (*GetExampleListReq) GetCreatedAtStart

func (x *GetExampleListReq) GetCreatedAtStart() string

func (*GetExampleListReq) GetIsDeleted

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

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.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

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 {

	// Primary key id
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// state
	Status bool `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

Request - Update

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