mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-11 00:44:20 -05:00
423e29e3ab
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
214 lines
7.6 KiB
Go
214 lines
7.6 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.20.1
|
|
// source: vpnapi.proto
|
|
|
|
package vpnproto
|
|
|
|
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
|
|
|
|
// APIClient is the client API for API 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 APIClient interface {
|
|
GetUpdate(ctx context.Context, in *GetUpdateRequest, opts ...grpc.CallOption) (*GetUpdateResponse, error)
|
|
GetK8SJoinArgs(ctx context.Context, in *GetK8SJoinArgsRequest, opts ...grpc.CallOption) (*GetK8SJoinArgsResponse, error)
|
|
GetK8SCertificateKey(ctx context.Context, in *GetK8SCertificateKeyRequest, opts ...grpc.CallOption) (*GetK8SCertificateKeyResponse, error)
|
|
GetDataKey(ctx context.Context, in *GetDataKeyRequest, opts ...grpc.CallOption) (*GetDataKeyResponse, error)
|
|
}
|
|
|
|
type aPIClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAPIClient(cc grpc.ClientConnInterface) APIClient {
|
|
return &aPIClient{cc}
|
|
}
|
|
|
|
func (c *aPIClient) GetUpdate(ctx context.Context, in *GetUpdateRequest, opts ...grpc.CallOption) (*GetUpdateResponse, error) {
|
|
out := new(GetUpdateResponse)
|
|
err := c.cc.Invoke(ctx, "/vpnapi.API/GetUpdate", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *aPIClient) GetK8SJoinArgs(ctx context.Context, in *GetK8SJoinArgsRequest, opts ...grpc.CallOption) (*GetK8SJoinArgsResponse, error) {
|
|
out := new(GetK8SJoinArgsResponse)
|
|
err := c.cc.Invoke(ctx, "/vpnapi.API/GetK8sJoinArgs", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *aPIClient) GetK8SCertificateKey(ctx context.Context, in *GetK8SCertificateKeyRequest, opts ...grpc.CallOption) (*GetK8SCertificateKeyResponse, error) {
|
|
out := new(GetK8SCertificateKeyResponse)
|
|
err := c.cc.Invoke(ctx, "/vpnapi.API/GetK8sCertificateKey", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *aPIClient) GetDataKey(ctx context.Context, in *GetDataKeyRequest, opts ...grpc.CallOption) (*GetDataKeyResponse, error) {
|
|
out := new(GetDataKeyResponse)
|
|
err := c.cc.Invoke(ctx, "/vpnapi.API/GetDataKey", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// APIServer is the server API for API service.
|
|
// All implementations must embed UnimplementedAPIServer
|
|
// for forward compatibility
|
|
type APIServer interface {
|
|
GetUpdate(context.Context, *GetUpdateRequest) (*GetUpdateResponse, error)
|
|
GetK8SJoinArgs(context.Context, *GetK8SJoinArgsRequest) (*GetK8SJoinArgsResponse, error)
|
|
GetK8SCertificateKey(context.Context, *GetK8SCertificateKeyRequest) (*GetK8SCertificateKeyResponse, error)
|
|
GetDataKey(context.Context, *GetDataKeyRequest) (*GetDataKeyResponse, error)
|
|
mustEmbedUnimplementedAPIServer()
|
|
}
|
|
|
|
// UnimplementedAPIServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedAPIServer struct {
|
|
}
|
|
|
|
func (UnimplementedAPIServer) GetUpdate(context.Context, *GetUpdateRequest) (*GetUpdateResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUpdate not implemented")
|
|
}
|
|
func (UnimplementedAPIServer) GetK8SJoinArgs(context.Context, *GetK8SJoinArgsRequest) (*GetK8SJoinArgsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetK8SJoinArgs not implemented")
|
|
}
|
|
func (UnimplementedAPIServer) GetK8SCertificateKey(context.Context, *GetK8SCertificateKeyRequest) (*GetK8SCertificateKeyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetK8SCertificateKey not implemented")
|
|
}
|
|
func (UnimplementedAPIServer) GetDataKey(context.Context, *GetDataKeyRequest) (*GetDataKeyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetDataKey not implemented")
|
|
}
|
|
func (UnimplementedAPIServer) mustEmbedUnimplementedAPIServer() {}
|
|
|
|
// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to APIServer will
|
|
// result in compilation errors.
|
|
type UnsafeAPIServer interface {
|
|
mustEmbedUnimplementedAPIServer()
|
|
}
|
|
|
|
func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer) {
|
|
s.RegisterService(&API_ServiceDesc, srv)
|
|
}
|
|
|
|
func _API_GetUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUpdateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(APIServer).GetUpdate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/vpnapi.API/GetUpdate",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(APIServer).GetUpdate(ctx, req.(*GetUpdateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _API_GetK8SJoinArgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetK8SJoinArgsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(APIServer).GetK8SJoinArgs(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/vpnapi.API/GetK8sJoinArgs",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(APIServer).GetK8SJoinArgs(ctx, req.(*GetK8SJoinArgsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _API_GetK8SCertificateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetK8SCertificateKeyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(APIServer).GetK8SCertificateKey(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/vpnapi.API/GetK8sCertificateKey",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(APIServer).GetK8SCertificateKey(ctx, req.(*GetK8SCertificateKeyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _API_GetDataKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetDataKeyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(APIServer).GetDataKey(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/vpnapi.API/GetDataKey",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(APIServer).GetDataKey(ctx, req.(*GetDataKeyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// API_ServiceDesc is the grpc.ServiceDesc for API service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var API_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "vpnapi.API",
|
|
HandlerType: (*APIServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetUpdate",
|
|
Handler: _API_GetUpdate_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetK8sJoinArgs",
|
|
Handler: _API_GetK8SJoinArgs_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetK8sCertificateKey",
|
|
Handler: _API_GetK8SCertificateKey_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetDataKey",
|
|
Handler: _API_GetDataKey_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "vpnapi.proto",
|
|
}
|