2022-01-14 20:11:39 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.3
2022-01-19 19:39:04 +08:00
// source: hello.proto
2022-01-14 20:11:39 +08:00
package murder
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
// HelloWorldClient is the client API for HelloWorld 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 HelloWorldClient interface {
Login ( ctx context . Context , in * HelloRequest , opts ... grpc . CallOption ) ( * HelloResponse , error )
2022-01-19 19:39:04 +08:00
GetScripts ( ctx context . Context , in * QueryCondition , opts ... grpc . CallOption ) ( * HelloResponse , error )
2022-01-14 20:11:39 +08:00
}
type helloWorldClient struct {
cc grpc . ClientConnInterface
}
func NewHelloWorldClient ( cc grpc . ClientConnInterface ) HelloWorldClient {
return & helloWorldClient { cc }
}
func ( c * helloWorldClient ) Login ( ctx context . Context , in * HelloRequest , opts ... grpc . CallOption ) ( * HelloResponse , error ) {
out := new ( HelloResponse )
err := c . cc . Invoke ( ctx , "/example_service.HelloWorld/Login" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-01-19 19:39:04 +08:00
func ( c * helloWorldClient ) GetScripts ( ctx context . Context , in * QueryCondition , opts ... grpc . CallOption ) ( * HelloResponse , error ) {
out := new ( HelloResponse )
err := c . cc . Invoke ( ctx , "/example_service.HelloWorld/GetScripts" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-01-14 20:11:39 +08:00
// HelloWorldServer is the server API for HelloWorld service.
// All implementations must embed UnimplementedHelloWorldServer
// for forward compatibility
type HelloWorldServer interface {
Login ( context . Context , * HelloRequest ) ( * HelloResponse , error )
2022-01-19 19:39:04 +08:00
GetScripts ( context . Context , * QueryCondition ) ( * HelloResponse , error )
2022-01-14 20:11:39 +08:00
mustEmbedUnimplementedHelloWorldServer ( )
}
// UnimplementedHelloWorldServer must be embedded to have forward compatible implementations.
type UnimplementedHelloWorldServer struct {
}
func ( UnimplementedHelloWorldServer ) Login ( context . Context , * HelloRequest ) ( * HelloResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Login not implemented" )
}
2022-01-19 19:39:04 +08:00
func ( UnimplementedHelloWorldServer ) GetScripts ( context . Context , * QueryCondition ) ( * HelloResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetScripts not implemented" )
}
2022-01-14 20:11:39 +08:00
func ( UnimplementedHelloWorldServer ) mustEmbedUnimplementedHelloWorldServer ( ) { }
// UnsafeHelloWorldServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HelloWorldServer will
// result in compilation errors.
type UnsafeHelloWorldServer interface {
mustEmbedUnimplementedHelloWorldServer ( )
}
func RegisterHelloWorldServer ( s grpc . ServiceRegistrar , srv HelloWorldServer ) {
s . RegisterService ( & HelloWorld_ServiceDesc , srv )
}
func _HelloWorld_Login_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( HelloRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( HelloWorldServer ) . Login ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/example_service.HelloWorld/Login" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( HelloWorldServer ) . Login ( ctx , req . ( * HelloRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-01-19 19:39:04 +08:00
func _HelloWorld_GetScripts_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QueryCondition )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( HelloWorldServer ) . GetScripts ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/example_service.HelloWorld/GetScripts" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( HelloWorldServer ) . GetScripts ( ctx , req . ( * QueryCondition ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-01-14 20:11:39 +08:00
// HelloWorld_ServiceDesc is the grpc.ServiceDesc for HelloWorld service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HelloWorld_ServiceDesc = grpc . ServiceDesc {
ServiceName : "example_service.HelloWorld" ,
HandlerType : ( * HelloWorldServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Login" ,
Handler : _HelloWorld_Login_Handler ,
} ,
2022-01-19 19:39:04 +08:00
{
MethodName : "GetScripts" ,
Handler : _HelloWorld_GetScripts_Handler ,
} ,
2022-01-14 20:11:39 +08:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
2022-01-19 19:39:04 +08:00
Metadata : "hello.proto" ,
2022-01-14 20:11:39 +08:00
}