serverpb

package
v0.0.0-...-cafa37b Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Router_Subscribe_FullMethodName  = "/gateway.Router/Subscribe"
	Router_SayHello_FullMethodName   = "/gateway.Router/SayHello"
	Router_HelloWorld_FullMethodName = "/gateway.Router/HelloWorld"
)

Variables

View Source
var File_github_com_lastbackend_toolkit_examples_wss_apis_server_proto protoreflect.FileDescriptor
View Source
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 NewRouterService(name string, opts ...runtime.Option) (_ toolkit.Service, err error)

func RegisterRouterServer

func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer)

Types

type Redis1Plugin

type Redis1Plugin interface {
	redis.Plugin
}

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 RouterHTTPService interface {
	SayHello(ctx context.Context, req *servicepb.HelloRequest) (*servicepb.HelloReply, error)

	HelloWorld(ctx context.Context, req *servicepb.HelloRequest) (*servicepb.HelloReply, error)
}

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

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

Cause function returns cause value.

func (SubscribeRequestValidationError) Error

Error satisfies the builtin error interface

func (SubscribeRequestValidationError) ErrorName

ErrorName returns error name.

func (SubscribeRequestValidationError) Field

Field function returns field value.

func (SubscribeRequestValidationError) Key

Key function returns key value.

func (SubscribeRequestValidationError) Reason

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

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

Cause function returns cause value.

func (SubscribeResponseValidationError) Error

Error satisfies the builtin error interface

func (SubscribeResponseValidationError) ErrorName

ErrorName returns error name.

func (SubscribeResponseValidationError) Field

Field function returns field value.

func (SubscribeResponseValidationError) Key

Key function returns key value.

func (SubscribeResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedRouterServer

type UnimplementedRouterServer struct {
}

UnimplementedRouterServer should be embedded to have forward compatible implementations.

func (UnimplementedRouterServer) HelloWorld

func (UnimplementedRouterServer) SayHello

func (UnimplementedRouterServer) Subscribe

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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