Documentation ¶
Index ¶
- Constants
- Variables
- func NewRouterService(name string, opts ...runtime.Option) (_ toolkit.Service, err error)
- func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer)
- type Redis1Plugin
- type RouterClient
- type RouterHTTPService
- type RouterServer
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (*SubscribeRequest) ProtoMessage()
- func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeRequest) Reset()
- func (x *SubscribeRequest) String() string
- func (m *SubscribeRequest) Validate() error
- func (m *SubscribeRequest) ValidateAll() error
- type SubscribeRequestMultiError
- type SubscribeRequestValidationError
- func (e SubscribeRequestValidationError) Cause() error
- func (e SubscribeRequestValidationError) Error() string
- func (e SubscribeRequestValidationError) ErrorName() string
- func (e SubscribeRequestValidationError) Field() string
- func (e SubscribeRequestValidationError) Key() bool
- func (e SubscribeRequestValidationError) Reason() string
- type SubscribeResponse
- func (*SubscribeResponse) Descriptor() ([]byte, []int)deprecated
- func (*SubscribeResponse) ProtoMessage()
- func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
- func (x *SubscribeResponse) Reset()
- func (x *SubscribeResponse) String() string
- func (m *SubscribeResponse) Validate() error
- func (m *SubscribeResponse) ValidateAll() error
- type SubscribeResponseMultiError
- type SubscribeResponseValidationError
- func (e SubscribeResponseValidationError) Cause() error
- func (e SubscribeResponseValidationError) Error() string
- func (e SubscribeResponseValidationError) ErrorName() string
- func (e SubscribeResponseValidationError) Field() string
- func (e SubscribeResponseValidationError) Key() bool
- func (e SubscribeResponseValidationError) Reason() string
- type UnimplementedRouterServer
- func (UnimplementedRouterServer) HelloWorld(context.Context, *gen.HelloRequest) (*gen.HelloReply, error)
- func (UnimplementedRouterServer) SayHello(context.Context, *gen.HelloRequest) (*gen.HelloReply, error)
- func (UnimplementedRouterServer) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error)
- type UnsafeRouterServer
Constants ¶
const ( Router_Subscribe_FullMethodName = "/gateway.Router/Subscribe" Router_SayHello_FullMethodName = "/gateway.Router/SayHello" Router_HelloWorld_FullMethodName = "/gateway.Router/HelloWorld" )
Variables ¶
var File_github_com_lastbackend_toolkit_examples_wss_apis_server_proto protoreflect.FileDescriptor
var Router_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gateway.Router", HandlerType: (*RouterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Subscribe", Handler: _Router_Subscribe_Handler, }, { MethodName: "SayHello", Handler: _Router_SayHello_Handler, }, { MethodName: "HelloWorld", Handler: _Router_HelloWorld_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/lastbackend/toolkit/examples/wss/apis/server.proto", }
Router_ServiceDesc is the grpc.ServiceDesc for Router service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewRouterService ¶
func RegisterRouterServer ¶
func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer)
Types ¶
type Redis1Plugin ¶
type RouterClient ¶
type RouterClient interface { Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) SayHello(ctx context.Context, in *gen.HelloRequest, opts ...grpc.CallOption) (*gen.HelloReply, error) HelloWorld(ctx context.Context, in *gen.HelloRequest, opts ...grpc.CallOption) (*gen.HelloReply, error) }
RouterClient is the client API for Router 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 NewRouterClient ¶
func NewRouterClient(cc grpc.ClientConnInterface) RouterClient
type RouterHTTPService ¶
type RouterServer ¶
type RouterServer interface { Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) SayHello(context.Context, *gen.HelloRequest) (*gen.HelloReply, error) HelloWorld(context.Context, *gen.HelloRequest) (*gen.HelloReply, error) }
RouterServer is the server API for Router service. All implementations should embed UnimplementedRouterServer for forward compatibility
type SubscribeRequest ¶
type SubscribeRequest struct {
// contains filtered or unexported fields
}
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) ProtoReflect ¶
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
func (*SubscribeRequest) Reset ¶
func (x *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (x *SubscribeRequest) String() string
func (*SubscribeRequest) Validate ¶
func (m *SubscribeRequest) Validate() error
Validate checks the field values on SubscribeRequest 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 (*SubscribeRequest) ValidateAll ¶
func (m *SubscribeRequest) ValidateAll() error
ValidateAll checks the field values on SubscribeRequest 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 SubscribeRequestMultiError, or nil if none found.
type SubscribeRequestMultiError ¶
type SubscribeRequestMultiError []error
SubscribeRequestMultiError is an error wrapping multiple validation errors returned by SubscribeRequest.ValidateAll() if the designated constraints aren't met.
func (SubscribeRequestMultiError) AllErrors ¶
func (m SubscribeRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SubscribeRequestMultiError) Error ¶
func (m SubscribeRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SubscribeRequestValidationError ¶
type SubscribeRequestValidationError struct {
// contains filtered or unexported fields
}
SubscribeRequestValidationError is the validation error returned by SubscribeRequest.Validate if the designated constraints aren't met.
func (SubscribeRequestValidationError) Cause ¶
func (e SubscribeRequestValidationError) Cause() error
Cause function returns cause value.
func (SubscribeRequestValidationError) Error ¶
func (e SubscribeRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SubscribeRequestValidationError) ErrorName ¶
func (e SubscribeRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SubscribeRequestValidationError) Field ¶
func (e SubscribeRequestValidationError) Field() string
Field function returns field value.
func (SubscribeRequestValidationError) Key ¶
func (e SubscribeRequestValidationError) Key() bool
Key function returns key value.
func (SubscribeRequestValidationError) Reason ¶
func (e SubscribeRequestValidationError) Reason() string
Reason function returns reason value.
type SubscribeResponse ¶
type SubscribeResponse struct {
// contains filtered or unexported fields
}
func (*SubscribeResponse) Descriptor
deprecated
func (*SubscribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) ProtoReflect ¶
func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
func (*SubscribeResponse) Reset ¶
func (x *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (x *SubscribeResponse) String() string
func (*SubscribeResponse) Validate ¶
func (m *SubscribeResponse) Validate() error
Validate checks the field values on SubscribeResponse 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 (*SubscribeResponse) ValidateAll ¶
func (m *SubscribeResponse) ValidateAll() error
ValidateAll checks the field values on SubscribeResponse 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 SubscribeResponseMultiError, or nil if none found.
type SubscribeResponseMultiError ¶
type SubscribeResponseMultiError []error
SubscribeResponseMultiError is an error wrapping multiple validation errors returned by SubscribeResponse.ValidateAll() if the designated constraints aren't met.
func (SubscribeResponseMultiError) AllErrors ¶
func (m SubscribeResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SubscribeResponseMultiError) Error ¶
func (m SubscribeResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SubscribeResponseValidationError ¶
type SubscribeResponseValidationError struct {
// contains filtered or unexported fields
}
SubscribeResponseValidationError is the validation error returned by SubscribeResponse.Validate if the designated constraints aren't met.
func (SubscribeResponseValidationError) Cause ¶
func (e SubscribeResponseValidationError) Cause() error
Cause function returns cause value.
func (SubscribeResponseValidationError) Error ¶
func (e SubscribeResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SubscribeResponseValidationError) ErrorName ¶
func (e SubscribeResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SubscribeResponseValidationError) Field ¶
func (e SubscribeResponseValidationError) Field() string
Field function returns field value.
func (SubscribeResponseValidationError) Key ¶
func (e SubscribeResponseValidationError) Key() bool
Key function returns key value.
func (SubscribeResponseValidationError) Reason ¶
func (e SubscribeResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedRouterServer ¶
type UnimplementedRouterServer struct { }
UnimplementedRouterServer should be embedded to have forward compatible implementations.
func (UnimplementedRouterServer) HelloWorld ¶
func (UnimplementedRouterServer) HelloWorld(context.Context, *gen.HelloRequest) (*gen.HelloReply, error)
func (UnimplementedRouterServer) SayHello ¶
func (UnimplementedRouterServer) SayHello(context.Context, *gen.HelloRequest) (*gen.HelloReply, error)
func (UnimplementedRouterServer) Subscribe ¶
func (UnimplementedRouterServer) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error)
type UnsafeRouterServer ¶
type UnsafeRouterServer interface {
// contains filtered or unexported methods
}
UnsafeRouterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RouterServer will result in compilation errors.