greeter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const OperationGreeterCreateGreeter = "/greeter.v1.Greeter/CreateGreeter"
View Source
const OperationGreeterDeleteGreeter = "/greeter.v1.Greeter/DeleteGreeter"
View Source
const OperationGreeterFindGreeter = "/greeter.v1.Greeter/FindGreeter"
View Source
const OperationGreeterGetGreeter = "/greeter.v1.Greeter/GetGreeter"
View Source
const OperationGreeterUpdateGreeter = "/greeter.v1.Greeter/UpdateGreeter"

Variables

View Source
var File_greeter_proto_greeter_proto protoreflect.FileDescriptor
View Source
var Greeter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "greeter.v1.Greeter",
	HandlerType: (*GreeterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateGreeter",
			Handler:    _Greeter_CreateGreeter_Handler,
		},
		{
			MethodName: "GetGreeter",
			Handler:    _Greeter_GetGreeter_Handler,
		},
		{
			MethodName: "FindGreeter",
			Handler:    _Greeter_FindGreeter_Handler,
		},
		{
			MethodName: "UpdateGreeter",
			Handler:    _Greeter_UpdateGreeter_Handler,
		},
		{
			MethodName: "DeleteGreeter",
			Handler:    _Greeter_DeleteGreeter_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "greeter-proto/greeter.proto",
}

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

Functions

func RegisterGreeterHTTPServer

func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)

func RegisterGreeterServer

func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)

Types

type CreateGreeterRequest

type CreateGreeterRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // the name of string must be between 2 and 50 character
	Age  int32  `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`  // the age of int32 must be >= 0
	// contains filtered or unexported fields
}

func (*CreateGreeterRequest) Descriptor deprecated

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

Deprecated: Use CreateGreeterRequest.ProtoReflect.Descriptor instead.

func (*CreateGreeterRequest) GetAge

func (x *CreateGreeterRequest) GetAge() int32

func (*CreateGreeterRequest) GetName

func (x *CreateGreeterRequest) GetName() string

func (*CreateGreeterRequest) ProtoMessage

func (*CreateGreeterRequest) ProtoMessage()

func (*CreateGreeterRequest) ProtoReflect

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

func (*CreateGreeterRequest) Reset

func (x *CreateGreeterRequest) Reset()

func (*CreateGreeterRequest) String

func (x *CreateGreeterRequest) String() string

func (*CreateGreeterRequest) Validate

func (m *CreateGreeterRequest) Validate() error

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

func (m *CreateGreeterRequest) ValidateAll() error

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

type CreateGreeterRequestMultiError

type CreateGreeterRequestMultiError []error

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

func (CreateGreeterRequestMultiError) AllErrors

func (m CreateGreeterRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateGreeterRequestMultiError) Error

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

type CreateGreeterRequestValidationError

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

CreateGreeterRequestValidationError is the validation error returned by CreateGreeterRequest.Validate if the designated constraints aren't met.

func (CreateGreeterRequestValidationError) Cause

Cause function returns cause value.

func (CreateGreeterRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateGreeterRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateGreeterRequestValidationError) Field

Field function returns field value.

func (CreateGreeterRequestValidationError) Key

Key function returns key value.

func (CreateGreeterRequestValidationError) Reason

Reason function returns reason value.

type FindGreeterReply

type FindGreeterReply struct {
	Page *Page           `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	List []*GreeterReply `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

func (*FindGreeterReply) Descriptor deprecated

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

Deprecated: Use FindGreeterReply.ProtoReflect.Descriptor instead.

func (*FindGreeterReply) GetList

func (x *FindGreeterReply) GetList() []*GreeterReply

func (*FindGreeterReply) GetPage

func (x *FindGreeterReply) GetPage() *Page

func (*FindGreeterReply) ProtoMessage

func (*FindGreeterReply) ProtoMessage()

func (*FindGreeterReply) ProtoReflect

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

func (*FindGreeterReply) Reset

func (x *FindGreeterReply) Reset()

func (*FindGreeterReply) String

func (x *FindGreeterReply) String() string

func (*FindGreeterReply) Validate

func (m *FindGreeterReply) Validate() error

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

func (m *FindGreeterReply) ValidateAll() error

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

type FindGreeterReplyMultiError

type FindGreeterReplyMultiError []error

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

func (FindGreeterReplyMultiError) AllErrors

func (m FindGreeterReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (FindGreeterReplyMultiError) Error

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

type FindGreeterReplyValidationError

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

FindGreeterReplyValidationError is the validation error returned by FindGreeterReply.Validate if the designated constraints aren't met.

func (FindGreeterReplyValidationError) Cause

Cause function returns cause value.

func (FindGreeterReplyValidationError) Error

Error satisfies the builtin error interface

func (FindGreeterReplyValidationError) ErrorName

ErrorName returns error name.

func (FindGreeterReplyValidationError) Field

Field function returns field value.

func (FindGreeterReplyValidationError) Key

Key function returns key value.

func (FindGreeterReplyValidationError) Reason

Reason function returns reason value.

type FindGreeterRequest

type FindGreeterRequest struct {
	Page *Page   `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	Age  *int32  `protobuf:"varint,3,opt,name=age,proto3,oneof" json:"age,omitempty"`
	// contains filtered or unexported fields
}

func (*FindGreeterRequest) Descriptor deprecated

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

Deprecated: Use FindGreeterRequest.ProtoReflect.Descriptor instead.

func (*FindGreeterRequest) GetAge

func (x *FindGreeterRequest) GetAge() int32

func (*FindGreeterRequest) GetName

func (x *FindGreeterRequest) GetName() string

func (*FindGreeterRequest) GetPage

func (x *FindGreeterRequest) GetPage() *Page

func (*FindGreeterRequest) ProtoMessage

func (*FindGreeterRequest) ProtoMessage()

func (*FindGreeterRequest) ProtoReflect

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

func (*FindGreeterRequest) Reset

func (x *FindGreeterRequest) Reset()

func (*FindGreeterRequest) String

func (x *FindGreeterRequest) String() string

func (*FindGreeterRequest) Validate

func (m *FindGreeterRequest) Validate() error

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

func (m *FindGreeterRequest) ValidateAll() error

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

type FindGreeterRequestMultiError

type FindGreeterRequestMultiError []error

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

func (FindGreeterRequestMultiError) AllErrors

func (m FindGreeterRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (FindGreeterRequestMultiError) Error

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

type FindGreeterRequestValidationError

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

FindGreeterRequestValidationError is the validation error returned by FindGreeterRequest.Validate if the designated constraints aren't met.

func (FindGreeterRequestValidationError) Cause

Cause function returns cause value.

func (FindGreeterRequestValidationError) Error

Error satisfies the builtin error interface

func (FindGreeterRequestValidationError) ErrorName

ErrorName returns error name.

func (FindGreeterRequestValidationError) Field

Field function returns field value.

func (FindGreeterRequestValidationError) Key

Key function returns key value.

func (FindGreeterRequestValidationError) Reason

Reason function returns reason value.

type GetGreeterReply

type GetGreeterReply struct {
	Id   uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Age  int32  `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
	// contains filtered or unexported fields
}

func (*GetGreeterReply) Descriptor deprecated

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

Deprecated: Use GetGreeterReply.ProtoReflect.Descriptor instead.

func (*GetGreeterReply) GetAge

func (x *GetGreeterReply) GetAge() int32

func (*GetGreeterReply) GetId

func (x *GetGreeterReply) GetId() uint64

func (*GetGreeterReply) GetName

func (x *GetGreeterReply) GetName() string

func (*GetGreeterReply) ProtoMessage

func (*GetGreeterReply) ProtoMessage()

func (*GetGreeterReply) ProtoReflect

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

func (*GetGreeterReply) Reset

func (x *GetGreeterReply) Reset()

func (*GetGreeterReply) String

func (x *GetGreeterReply) String() string

func (*GetGreeterReply) Validate

func (m *GetGreeterReply) Validate() error

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

func (m *GetGreeterReply) ValidateAll() error

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

type GetGreeterReplyMultiError

type GetGreeterReplyMultiError []error

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

func (GetGreeterReplyMultiError) AllErrors

func (m GetGreeterReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetGreeterReplyMultiError) Error

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

type GetGreeterReplyValidationError

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

GetGreeterReplyValidationError is the validation error returned by GetGreeterReply.Validate if the designated constraints aren't met.

func (GetGreeterReplyValidationError) Cause

Cause function returns cause value.

func (GetGreeterReplyValidationError) Error

Error satisfies the builtin error interface

func (GetGreeterReplyValidationError) ErrorName

func (e GetGreeterReplyValidationError) ErrorName() string

ErrorName returns error name.

func (GetGreeterReplyValidationError) Field

Field function returns field value.

func (GetGreeterReplyValidationError) Key

Key function returns key value.

func (GetGreeterReplyValidationError) Reason

Reason function returns reason value.

type GetGreeterRequest

type GetGreeterRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetGreeterRequest) Descriptor deprecated

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

Deprecated: Use GetGreeterRequest.ProtoReflect.Descriptor instead.

func (*GetGreeterRequest) GetId

func (x *GetGreeterRequest) GetId() uint64

func (*GetGreeterRequest) ProtoMessage

func (*GetGreeterRequest) ProtoMessage()

func (*GetGreeterRequest) ProtoReflect

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

func (*GetGreeterRequest) Reset

func (x *GetGreeterRequest) Reset()

func (*GetGreeterRequest) String

func (x *GetGreeterRequest) String() string

func (*GetGreeterRequest) Validate

func (m *GetGreeterRequest) Validate() error

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

func (m *GetGreeterRequest) ValidateAll() error

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

type GetGreeterRequestMultiError

type GetGreeterRequestMultiError []error

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

func (GetGreeterRequestMultiError) AllErrors

func (m GetGreeterRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetGreeterRequestMultiError) Error

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

type GetGreeterRequestValidationError

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

GetGreeterRequestValidationError is the validation error returned by GetGreeterRequest.Validate if the designated constraints aren't met.

func (GetGreeterRequestValidationError) Cause

Cause function returns cause value.

func (GetGreeterRequestValidationError) Error

Error satisfies the builtin error interface

func (GetGreeterRequestValidationError) ErrorName

ErrorName returns error name.

func (GetGreeterRequestValidationError) Field

Field function returns field value.

func (GetGreeterRequestValidationError) Key

Key function returns key value.

func (GetGreeterRequestValidationError) Reason

Reason function returns reason value.

type GreeterClient

type GreeterClient interface {
	CreateGreeter(ctx context.Context, in *CreateGreeterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetGreeter(ctx context.Context, in *GetGreeterRequest, opts ...grpc.CallOption) (*GetGreeterReply, error)
	FindGreeter(ctx context.Context, in *FindGreeterRequest, opts ...grpc.CallOption) (*FindGreeterReply, error)
	UpdateGreeter(ctx context.Context, in *UpdateGreeterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteGreeter(ctx context.Context, in *IdsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

GreeterClient is the client API for Greeter 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.

func NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterHTTPClient

type GreeterHTTPClient interface {
	CreateGreeter(ctx context.Context, req *CreateGreeterRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
	DeleteGreeter(ctx context.Context, req *IdsRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
	FindGreeter(ctx context.Context, req *FindGreeterRequest, opts ...http.CallOption) (rsp *FindGreeterReply, err error)
	GetGreeter(ctx context.Context, req *GetGreeterRequest, opts ...http.CallOption) (rsp *GetGreeterReply, err error)
	UpdateGreeter(ctx context.Context, req *UpdateGreeterRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
}

func NewGreeterHTTPClient

func NewGreeterHTTPClient(client *http.Client) GreeterHTTPClient

type GreeterHTTPClientImpl

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

func (*GreeterHTTPClientImpl) CreateGreeter

func (*GreeterHTTPClientImpl) DeleteGreeter

func (c *GreeterHTTPClientImpl) DeleteGreeter(ctx context.Context, in *IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error)

func (*GreeterHTTPClientImpl) FindGreeter

func (*GreeterHTTPClientImpl) GetGreeter

func (*GreeterHTTPClientImpl) UpdateGreeter

type GreeterReply

type GreeterReply struct {
	Id   uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Age  int32  `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
	// contains filtered or unexported fields
}

func (*GreeterReply) Descriptor deprecated

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

Deprecated: Use GreeterReply.ProtoReflect.Descriptor instead.

func (*GreeterReply) GetAge

func (x *GreeterReply) GetAge() int32

func (*GreeterReply) GetId

func (x *GreeterReply) GetId() uint64

func (*GreeterReply) GetName

func (x *GreeterReply) GetName() string

func (*GreeterReply) ProtoMessage

func (*GreeterReply) ProtoMessage()

func (*GreeterReply) ProtoReflect

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

func (*GreeterReply) Reset

func (x *GreeterReply) Reset()

func (*GreeterReply) String

func (x *GreeterReply) String() string

func (*GreeterReply) Validate

func (m *GreeterReply) Validate() error

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

func (m *GreeterReply) ValidateAll() error

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

type GreeterReplyMultiError

type GreeterReplyMultiError []error

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

func (GreeterReplyMultiError) AllErrors

func (m GreeterReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GreeterReplyMultiError) Error

func (m GreeterReplyMultiError) Error() string

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

type GreeterReplyValidationError

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

GreeterReplyValidationError is the validation error returned by GreeterReply.Validate if the designated constraints aren't met.

func (GreeterReplyValidationError) Cause

Cause function returns cause value.

func (GreeterReplyValidationError) Error

Error satisfies the builtin error interface

func (GreeterReplyValidationError) ErrorName

func (e GreeterReplyValidationError) ErrorName() string

ErrorName returns error name.

func (GreeterReplyValidationError) Field

Field function returns field value.

func (GreeterReplyValidationError) Key

Key function returns key value.

func (GreeterReplyValidationError) Reason

Reason function returns reason value.

type GreeterServer

type GreeterServer interface {
	CreateGreeter(context.Context, *CreateGreeterRequest) (*emptypb.Empty, error)
	GetGreeter(context.Context, *GetGreeterRequest) (*GetGreeterReply, error)
	FindGreeter(context.Context, *FindGreeterRequest) (*FindGreeterReply, error)
	UpdateGreeter(context.Context, *UpdateGreeterRequest) (*emptypb.Empty, error)
	DeleteGreeter(context.Context, *IdsRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility

type IdsRequest

type IdsRequest struct {
	Ids string `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*IdsRequest) Descriptor deprecated

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

Deprecated: Use IdsRequest.ProtoReflect.Descriptor instead.

func (*IdsRequest) GetIds

func (x *IdsRequest) GetIds() string

func (*IdsRequest) ProtoMessage

func (*IdsRequest) ProtoMessage()

func (*IdsRequest) ProtoReflect

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

func (*IdsRequest) Reset

func (x *IdsRequest) Reset()

func (*IdsRequest) String

func (x *IdsRequest) String() string

func (*IdsRequest) Validate

func (m *IdsRequest) Validate() error

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

func (m *IdsRequest) ValidateAll() error

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

type IdsRequestMultiError

type IdsRequestMultiError []error

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

func (IdsRequestMultiError) AllErrors

func (m IdsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (IdsRequestMultiError) Error

func (m IdsRequestMultiError) Error() string

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

type IdsRequestValidationError

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

IdsRequestValidationError is the validation error returned by IdsRequest.Validate if the designated constraints aren't met.

func (IdsRequestValidationError) Cause

func (e IdsRequestValidationError) Cause() error

Cause function returns cause value.

func (IdsRequestValidationError) Error

Error satisfies the builtin error interface

func (IdsRequestValidationError) ErrorName

func (e IdsRequestValidationError) ErrorName() string

ErrorName returns error name.

func (IdsRequestValidationError) Field

Field function returns field value.

func (IdsRequestValidationError) Key

Key function returns key value.

func (IdsRequestValidationError) Reason

func (e IdsRequestValidationError) Reason() string

Reason function returns reason value.

type Page

type Page struct {
	Num     uint64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
	Size    uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Total   int64  `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
	Disable bool   `protobuf:"varint,4,opt,name=disable,proto3" json:"disable,omitempty"`
	// contains filtered or unexported fields
}

func (*Page) Descriptor deprecated

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

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetDisable

func (x *Page) GetDisable() bool

func (*Page) GetNum

func (x *Page) GetNum() uint64

func (*Page) GetSize

func (x *Page) GetSize() uint64

func (*Page) GetTotal

func (x *Page) GetTotal() int64

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) ProtoReflect

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

func (*Page) Reset

func (x *Page) Reset()

func (*Page) String

func (x *Page) String() string

func (*Page) Validate

func (m *Page) Validate() error

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

func (m *Page) ValidateAll() error

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

type PageMultiError

type PageMultiError []error

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

func (PageMultiError) AllErrors

func (m PageMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PageMultiError) Error

func (m PageMultiError) Error() string

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

type PageValidationError

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

PageValidationError is the validation error returned by Page.Validate if the designated constraints aren't met.

func (PageValidationError) Cause

func (e PageValidationError) Cause() error

Cause function returns cause value.

func (PageValidationError) Error

func (e PageValidationError) Error() string

Error satisfies the builtin error interface

func (PageValidationError) ErrorName

func (e PageValidationError) ErrorName() string

ErrorName returns error name.

func (PageValidationError) Field

func (e PageValidationError) Field() string

Field function returns field value.

func (PageValidationError) Key

func (e PageValidationError) Key() bool

Key function returns key value.

func (PageValidationError) Reason

func (e PageValidationError) Reason() string

Reason function returns reason value.

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer must be embedded to have forward compatible implementations.

func (UnimplementedGreeterServer) CreateGreeter

func (UnimplementedGreeterServer) DeleteGreeter

func (UnimplementedGreeterServer) FindGreeter

func (UnimplementedGreeterServer) GetGreeter

func (UnimplementedGreeterServer) UpdateGreeter

type UnsafeGreeterServer

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

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

type UpdateGreeterRequest

type UpdateGreeterRequest struct {
	Id   uint64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` // the name of string must be between 2 and 50 character
	Age  *int32  `protobuf:"varint,3,opt,name=age,proto3,oneof" json:"age,omitempty"`  // the age of int32 must be >= 0
	// contains filtered or unexported fields
}

func (*UpdateGreeterRequest) Descriptor deprecated

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

Deprecated: Use UpdateGreeterRequest.ProtoReflect.Descriptor instead.

func (*UpdateGreeterRequest) GetAge

func (x *UpdateGreeterRequest) GetAge() int32

func (*UpdateGreeterRequest) GetId

func (x *UpdateGreeterRequest) GetId() uint64

func (*UpdateGreeterRequest) GetName

func (x *UpdateGreeterRequest) GetName() string

func (*UpdateGreeterRequest) ProtoMessage

func (*UpdateGreeterRequest) ProtoMessage()

func (*UpdateGreeterRequest) ProtoReflect

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

func (*UpdateGreeterRequest) Reset

func (x *UpdateGreeterRequest) Reset()

func (*UpdateGreeterRequest) String

func (x *UpdateGreeterRequest) String() string

func (*UpdateGreeterRequest) Validate

func (m *UpdateGreeterRequest) Validate() error

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

func (m *UpdateGreeterRequest) ValidateAll() error

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

type UpdateGreeterRequestMultiError

type UpdateGreeterRequestMultiError []error

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

func (UpdateGreeterRequestMultiError) AllErrors

func (m UpdateGreeterRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateGreeterRequestMultiError) Error

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

type UpdateGreeterRequestValidationError

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

UpdateGreeterRequestValidationError is the validation error returned by UpdateGreeterRequest.Validate if the designated constraints aren't met.

func (UpdateGreeterRequestValidationError) Cause

Cause function returns cause value.

func (UpdateGreeterRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateGreeterRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateGreeterRequestValidationError) Field

Field function returns field value.

func (UpdateGreeterRequestValidationError) Key

Key function returns key value.

func (UpdateGreeterRequestValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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