GODT-1847: add option to export TLS Certificates in GUI.

This commit is contained in:
Xavier Michelon
2022-12-01 12:41:51 +01:00
parent 4375d77a98
commit 5b9c28e6f0
19 changed files with 2611 additions and 1389 deletions

View File

@ -8,7 +8,6 @@ package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@ -52,6 +51,7 @@ type BridgeClient interface {
ColorSchemeName(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
CurrentEmailClient(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
ReportBug(ctx context.Context, in *ReportBugRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ExportTLSCertificates(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
ForceLauncher(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
SetMainExecutable(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
// login
@ -332,6 +332,15 @@ func (c *bridgeClient) ReportBug(ctx context.Context, in *ReportBugRequest, opts
return out, nil
}
func (c *bridgeClient) ExportTLSCertificates(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.Bridge/ExportTLSCertificates", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bridgeClient) ForceLauncher(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.Bridge/ForceLauncher", in, out, opts...)
@ -647,6 +656,7 @@ type BridgeServer interface {
ColorSchemeName(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
CurrentEmailClient(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
ReportBug(context.Context, *ReportBugRequest) (*emptypb.Empty, error)
ExportTLSCertificates(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
ForceLauncher(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
SetMainExecutable(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
// login
@ -768,6 +778,9 @@ func (UnimplementedBridgeServer) CurrentEmailClient(context.Context, *emptypb.Em
func (UnimplementedBridgeServer) ReportBug(context.Context, *ReportBugRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReportBug not implemented")
}
func (UnimplementedBridgeServer) ExportTLSCertificates(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ExportTLSCertificates not implemented")
}
func (UnimplementedBridgeServer) ForceLauncher(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ForceLauncher not implemented")
}
@ -1336,6 +1349,24 @@ func _Bridge_ReportBug_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler)
}
func _Bridge_ExportTLSCertificates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(wrapperspb.StringValue)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BridgeServer).ExportTLSCertificates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.Bridge/ExportTLSCertificates",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BridgeServer).ExportTLSCertificates(ctx, req.(*wrapperspb.StringValue))
}
return interceptor(ctx, in, info, handler)
}
func _Bridge_ForceLauncher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(wrapperspb.StringValue)
if err := dec(in); err != nil {
@ -1972,6 +2003,10 @@ var Bridge_ServiceDesc = grpc.ServiceDesc{
MethodName: "ReportBug",
Handler: _Bridge_ReportBug_Handler,
},
{
MethodName: "ExportTLSCertificates",
Handler: _Bridge_ExportTLSCertificates_Handler,
},
{
MethodName: "ForceLauncher",
Handler: _Bridge_ForceLauncher_Handler,