get.porter.sh/porter@v1.3.0/pkg/signing/plugins/proto/signing_protocol_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.2.0 4 // - protoc v3.12.4 5 // source: signing_protocol.proto 6 7 package proto 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 ) 15 16 // This is a compile-time assertion to ensure that this generated file 17 // is compatible with the grpc package it is being compiled against. 18 // Requires gRPC-Go v1.32.0 or later. 19 const _ = grpc.SupportPackageIsVersion7 20 21 // SigningProtocolClient is the client API for SigningProtocol service. 22 // 23 // 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. 24 type SigningProtocolClient interface { 25 Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) 26 Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) 27 Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error) 28 } 29 30 type signingProtocolClient struct { 31 cc grpc.ClientConnInterface 32 } 33 34 func NewSigningProtocolClient(cc grpc.ClientConnInterface) SigningProtocolClient { 35 return &signingProtocolClient{cc} 36 } 37 38 func (c *signingProtocolClient) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) { 39 out := new(SignResponse) 40 err := c.cc.Invoke(ctx, "/plugins.SigningProtocol/Sign", in, out, opts...) 41 if err != nil { 42 return nil, err 43 } 44 return out, nil 45 } 46 47 func (c *signingProtocolClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) { 48 out := new(VerifyResponse) 49 err := c.cc.Invoke(ctx, "/plugins.SigningProtocol/Verify", in, out, opts...) 50 if err != nil { 51 return nil, err 52 } 53 return out, nil 54 } 55 56 func (c *signingProtocolClient) Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error) { 57 out := new(ConnectResponse) 58 err := c.cc.Invoke(ctx, "/plugins.SigningProtocol/Connect", in, out, opts...) 59 if err != nil { 60 return nil, err 61 } 62 return out, nil 63 } 64 65 // SigningProtocolServer is the server API for SigningProtocol service. 66 // All implementations must embed UnimplementedSigningProtocolServer 67 // for forward compatibility 68 type SigningProtocolServer interface { 69 Sign(context.Context, *SignRequest) (*SignResponse, error) 70 Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) 71 Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) 72 mustEmbedUnimplementedSigningProtocolServer() 73 } 74 75 // UnimplementedSigningProtocolServer must be embedded to have forward compatible implementations. 76 type UnimplementedSigningProtocolServer struct { 77 } 78 79 func (UnimplementedSigningProtocolServer) Sign(context.Context, *SignRequest) (*SignResponse, error) { 80 return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented") 81 } 82 func (UnimplementedSigningProtocolServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) { 83 return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") 84 } 85 func (UnimplementedSigningProtocolServer) Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) { 86 return nil, status.Errorf(codes.Unimplemented, "method Connect not implemented") 87 } 88 func (UnimplementedSigningProtocolServer) mustEmbedUnimplementedSigningProtocolServer() {} 89 90 // UnsafeSigningProtocolServer may be embedded to opt out of forward compatibility for this service. 91 // Use of this interface is not recommended, as added methods to SigningProtocolServer will 92 // result in compilation errors. 93 type UnsafeSigningProtocolServer interface { 94 mustEmbedUnimplementedSigningProtocolServer() 95 } 96 97 func RegisterSigningProtocolServer(s grpc.ServiceRegistrar, srv SigningProtocolServer) { 98 s.RegisterService(&SigningProtocol_ServiceDesc, srv) 99 } 100 101 func _SigningProtocol_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 102 in := new(SignRequest) 103 if err := dec(in); err != nil { 104 return nil, err 105 } 106 if interceptor == nil { 107 return srv.(SigningProtocolServer).Sign(ctx, in) 108 } 109 info := &grpc.UnaryServerInfo{ 110 Server: srv, 111 FullMethod: "/plugins.SigningProtocol/Sign", 112 } 113 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 114 return srv.(SigningProtocolServer).Sign(ctx, req.(*SignRequest)) 115 } 116 return interceptor(ctx, in, info, handler) 117 } 118 119 func _SigningProtocol_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 120 in := new(VerifyRequest) 121 if err := dec(in); err != nil { 122 return nil, err 123 } 124 if interceptor == nil { 125 return srv.(SigningProtocolServer).Verify(ctx, in) 126 } 127 info := &grpc.UnaryServerInfo{ 128 Server: srv, 129 FullMethod: "/plugins.SigningProtocol/Verify", 130 } 131 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 132 return srv.(SigningProtocolServer).Verify(ctx, req.(*VerifyRequest)) 133 } 134 return interceptor(ctx, in, info, handler) 135 } 136 137 func _SigningProtocol_Connect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 138 in := new(ConnectRequest) 139 if err := dec(in); err != nil { 140 return nil, err 141 } 142 if interceptor == nil { 143 return srv.(SigningProtocolServer).Connect(ctx, in) 144 } 145 info := &grpc.UnaryServerInfo{ 146 Server: srv, 147 FullMethod: "/plugins.SigningProtocol/Connect", 148 } 149 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 150 return srv.(SigningProtocolServer).Connect(ctx, req.(*ConnectRequest)) 151 } 152 return interceptor(ctx, in, info, handler) 153 } 154 155 // SigningProtocol_ServiceDesc is the grpc.ServiceDesc for SigningProtocol service. 156 // It's only intended for direct use with grpc.RegisterService, 157 // and not to be introspected or modified (even as a copy) 158 var SigningProtocol_ServiceDesc = grpc.ServiceDesc{ 159 ServiceName: "plugins.SigningProtocol", 160 HandlerType: (*SigningProtocolServer)(nil), 161 Methods: []grpc.MethodDesc{ 162 { 163 MethodName: "Sign", 164 Handler: _SigningProtocol_Sign_Handler, 165 }, 166 { 167 MethodName: "Verify", 168 Handler: _SigningProtocol_Verify_Handler, 169 }, 170 { 171 MethodName: "Connect", 172 Handler: _SigningProtocol_Connect_Handler, 173 }, 174 }, 175 Streams: []grpc.StreamDesc{}, 176 Metadata: "signing_protocol.proto", 177 }