mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-15 02:50:44 +01:00
106 lines
3.8 KiB
Go
106 lines
3.8 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.21.12
|
|
// source: pkg/grpc/ctrlserver/authentication.proto
|
|
|
|
package rpc
|
|
|
|
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
|
|
|
|
// AuthenticationClient is the client API for Authentication 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 AuthenticationClient interface {
|
|
JoinMesh(ctx context.Context, in *JoinAuthMeshRequest, opts ...grpc.CallOption) (*JoinAuthMeshReply, error)
|
|
}
|
|
|
|
type authenticationClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAuthenticationClient(cc grpc.ClientConnInterface) AuthenticationClient {
|
|
return &authenticationClient{cc}
|
|
}
|
|
|
|
func (c *authenticationClient) JoinMesh(ctx context.Context, in *JoinAuthMeshRequest, opts ...grpc.CallOption) (*JoinAuthMeshReply, error) {
|
|
out := new(JoinAuthMeshReply)
|
|
err := c.cc.Invoke(ctx, "/rpctypes.Authentication/JoinMesh", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AuthenticationServer is the server API for Authentication service.
|
|
// All implementations must embed UnimplementedAuthenticationServer
|
|
// for forward compatibility
|
|
type AuthenticationServer interface {
|
|
JoinMesh(context.Context, *JoinAuthMeshRequest) (*JoinAuthMeshReply, error)
|
|
mustEmbedUnimplementedAuthenticationServer()
|
|
}
|
|
|
|
// UnimplementedAuthenticationServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedAuthenticationServer struct {
|
|
}
|
|
|
|
func (UnimplementedAuthenticationServer) JoinMesh(context.Context, *JoinAuthMeshRequest) (*JoinAuthMeshReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method JoinMesh not implemented")
|
|
}
|
|
func (UnimplementedAuthenticationServer) mustEmbedUnimplementedAuthenticationServer() {}
|
|
|
|
// UnsafeAuthenticationServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AuthenticationServer will
|
|
// result in compilation errors.
|
|
type UnsafeAuthenticationServer interface {
|
|
mustEmbedUnimplementedAuthenticationServer()
|
|
}
|
|
|
|
func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer) {
|
|
s.RegisterService(&Authentication_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Authentication_JoinMesh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(JoinAuthMeshRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthenticationServer).JoinMesh(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/rpctypes.Authentication/JoinMesh",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthenticationServer).JoinMesh(ctx, req.(*JoinAuthMeshRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Authentication_ServiceDesc is the grpc.ServiceDesc for Authentication service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Authentication_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "rpctypes.Authentication",
|
|
HandlerType: (*AuthenticationServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "JoinMesh",
|
|
Handler: _Authentication_JoinMesh_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "pkg/grpc/ctrlserver/authentication.proto",
|
|
}
|