pb

package
v1.0.0-dev.156 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Example_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "main.Example",
	HandlerType: (*ExampleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "test",
			Handler:    _Example_Test_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "example.proto",
}

Example_ServiceDesc is the grpc.ServiceDesc for Example 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_proto protoreflect.FileDescriptor

Functions

func RegisterExampleServer

func RegisterExampleServer(s grpc.ServiceRegistrar, srv ExampleServer)

Types

type ExampleClient

type ExampleClient interface {
	Test(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
}

ExampleClient is the client API for Example 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 NewExampleClient

func NewExampleClient(cc grpc.ClientConnInterface) ExampleClient

type ExampleServer

type ExampleServer interface {
	Test(context.Context, *TestRequest) (*TestResponse, error)
	// contains filtered or unexported methods
}

ExampleServer is the server API for Example service. All implementations must embed UnimplementedExampleServer for forward compatibility

type TestRequest

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

func (*TestRequest) Descriptor deprecated

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

Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.

func (*TestRequest) GetMessage

func (x *TestRequest) GetMessage() string

func (*TestRequest) ProtoMessage

func (*TestRequest) ProtoMessage()

func (*TestRequest) ProtoReflect

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

func (*TestRequest) Reset

func (x *TestRequest) Reset()

func (*TestRequest) String

func (x *TestRequest) String() string

type TestResponse

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

func (*TestResponse) Descriptor deprecated

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

Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.

func (*TestResponse) GetMessage

func (x *TestResponse) GetMessage() string

func (*TestResponse) ProtoMessage

func (*TestResponse) ProtoMessage()

func (*TestResponse) ProtoReflect

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

func (*TestResponse) Reset

func (x *TestResponse) Reset()

func (*TestResponse) String

func (x *TestResponse) String() string

type UnimplementedExampleServer

type UnimplementedExampleServer struct {
}

UnimplementedExampleServer must be embedded to have forward compatible implementations.

func (UnimplementedExampleServer) Test

type UnsafeExampleServer

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

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

Jump to

Keyboard shortcuts

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