protoservice

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

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

Variables

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

ProtoService2_ServiceDesc is the grpc.ServiceDesc for ProtoService2 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 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 ProtoService2ClientRoutes added in v1.5.0

func ProtoService2ClientRoutes(cli ProtoService2Client, opts ...gors.Option) []gors.Route

func ProtoService2ServerRoutes added in v1.5.0

func ProtoService2ServerRoutes(srv ProtoService2Server, opts ...gors.Option) []gors.Route

func ProtoServiceClientRoutes

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

func ProtoServiceServerRoutes

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

func RegisterProtoService2Server added in v1.5.0

func RegisterProtoService2Server(s grpc.ServiceRegistrar, srv ProtoService2Server)

func RegisterProtoServiceServer

func RegisterProtoServiceServer(s grpc.ServiceRegistrar, srv ProtoServiceServer)

Types

type HelloReply1 added in v1.5.0

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

func (*HelloReply1) Descriptor deprecated added in v1.5.0

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

Deprecated: Use HelloReply1.ProtoReflect.Descriptor instead.

func (*HelloReply1) GetMessage added in v1.5.0

func (x *HelloReply1) GetMessage() string

func (*HelloReply1) ProtoMessage added in v1.5.0

func (*HelloReply1) ProtoMessage()

func (*HelloReply1) ProtoReflect added in v1.5.0

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

func (*HelloReply1) Reset added in v1.5.0

func (x *HelloReply1) Reset()

func (*HelloReply1) String added in v1.5.0

func (x *HelloReply1) String() string

type HelloRequest1 added in v1.5.0

type HelloRequest1 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"`
	HelloRequest *protodemo.HelloRequest `protobuf:"bytes,5,opt,name=helloRequest,proto3" json:"helloRequest,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloRequest1) Descriptor deprecated added in v1.5.0

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

Deprecated: Use HelloRequest1.ProtoReflect.Descriptor instead.

func (*HelloRequest1) GetAge added in v1.5.0

func (x *HelloRequest1) GetAge() int32

func (*HelloRequest1) GetHelloRequest added in v1.5.0

func (x *HelloRequest1) GetHelloRequest() *protodemo.HelloRequest

func (*HelloRequest1) GetName added in v1.5.0

func (x *HelloRequest1) GetName() string

func (*HelloRequest1) GetSalary added in v1.5.0

func (x *HelloRequest1) GetSalary() float64

func (*HelloRequest1) GetToken added in v1.5.0

func (x *HelloRequest1) GetToken() string

func (*HelloRequest1) ProtoMessage added in v1.5.0

func (*HelloRequest1) ProtoMessage()

func (*HelloRequest1) ProtoReflect added in v1.5.0

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

func (*HelloRequest1) Reset added in v1.5.0

func (x *HelloRequest1) Reset()

func (*HelloRequest1) String added in v1.5.0

func (x *HelloRequest1) String() string

type ProtoService2Client added in v1.5.0

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

ProtoService2Client is the client API for ProtoService2 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 NewProtoService2Client added in v1.5.0

func NewProtoService2Client(cc grpc.ClientConnInterface) ProtoService2Client

type ProtoService2Server added in v1.5.0

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

ProtoService2Server is the server API for ProtoService2 service. All implementations must embed UnimplementedProtoService2Server for forward compatibility

type ProtoServiceClient

type ProtoServiceClient interface {
	// @GORS @POST @Path(/Method) @ProtoJSONBinding @ProtoJSONRender
	Method(ctx context.Context, in *HelloRequest1, opts ...grpc.CallOption) (*HelloReply1, 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, *HelloRequest1) (*HelloReply1, error)
	// contains filtered or unexported methods
}

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

type UnimplementedProtoService2Server added in v1.5.0

type UnimplementedProtoService2Server struct {
}

UnimplementedProtoService2Server must be embedded to have forward compatible implementations.

func (UnimplementedProtoService2Server) Method added in v1.5.0

type UnimplementedProtoServiceServer

type UnimplementedProtoServiceServer struct {
}

UnimplementedProtoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedProtoServiceServer) Method

type UnsafeProtoService2Server added in v1.5.0

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

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

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