protoservice

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtoService_Method_FullMethodName = "/protoservice.ProtoService/Method"
)

Variables

View Source
var File_example_api_protoservice_protoservice_proto protoreflect.FileDescriptor
View Source
var ProtoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protoservice.ProtoService",
	HandlerType: (*ProtoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Method",
			Handler:    _ProtoService_Method_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "example/api/protoservice/protoservice.proto",
}

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

Functions

func ProtoServiceClientRoutes

func ProtoServiceClientRoutes(cli ProtoServiceClient, opts ...gors.Option) []gors.Route

func ProtoServiceServerRoutes

func ProtoServiceServerRoutes(srv ProtoServiceServer, opts ...gors.Option) []gors.Route

func RegisterProtoServiceServer

func RegisterProtoServiceServer(s grpc.ServiceRegistrar, srv ProtoServiceServer)

Types

type HelloReply

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

func (*HelloReply) Descriptor deprecated

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

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMessage

func (x *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) ProtoReflect

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

func (*HelloReply) Reset

func (x *HelloReply) Reset()

func (*HelloReply) String

func (x *HelloReply) String() string

type HelloRequest

type HelloRequest struct {
	Name   string  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Age    int32   `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	Salary float64 `protobuf:"fixed64,3,opt,name=salary,proto3" json:"salary,omitempty"`
	Token  string  `protobuf:"bytes,4,opt,name=Token,proto3" json:"Token,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetAge

func (x *HelloRequest) GetAge() int32

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

func (*HelloRequest) GetSalary

func (x *HelloRequest) GetSalary() float64

func (*HelloRequest) GetToken

func (x *HelloRequest) GetToken() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type ProtoServiceClient

type ProtoServiceClient interface {
	// @GORS @POST @Path(/Method) @ProtoJSONBinding @ProtoJSONRender
	Method(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}

ProtoServiceClient is the client API for ProtoService 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.

type ProtoServiceServer

type ProtoServiceServer interface {
	// @GORS @POST @Path(/Method) @ProtoJSONBinding @ProtoJSONRender
	Method(context.Context, *HelloRequest) (*HelloReply, error)
	// contains filtered or unexported methods
}

ProtoServiceServer is the server API for ProtoService service. All implementations must embed UnimplementedProtoServiceServer for forward compatibility

type UnimplementedProtoServiceServer

type UnimplementedProtoServiceServer struct {
}

UnimplementedProtoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedProtoServiceServer) Method

type UnsafeProtoServiceServer

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

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

Jump to

Keyboard shortcuts

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