GODT-1901: Allow to set IMAP SSL from UI

This commit is contained in:
Leander Beernaert
2022-10-13 10:58:11 +02:00
committed by James Houlahan
parent 209c315a76
commit e10cd2a3ed
116 changed files with 3713 additions and 973 deletions

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.7
// - protoc v3.19.4
// source: bridge.proto
package grpc
@ -71,6 +71,8 @@ type BridgeClient interface {
IsDoHEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
SetUseSslForSmtp(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
UseSslForSmtp(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
SetUseSslForImap(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
UseSslForImap(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
Hostname(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
ImapPort(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.Int32Value, error)
SmtpPort(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.Int32Value, error)
@ -478,6 +480,24 @@ func (c *bridgeClient) UseSslForSmtp(ctx context.Context, in *emptypb.Empty, opt
return out, nil
}
func (c *bridgeClient) SetUseSslForImap(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.Bridge/SetUseSslForImap", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bridgeClient) UseSslForImap(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, "/grpc.Bridge/UseSslForImap", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bridgeClient) Hostname(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, "/grpc.Bridge/Hostname", in, out, opts...)
@ -696,6 +716,8 @@ type BridgeServer interface {
IsDoHEnabled(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
SetUseSslForSmtp(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error)
UseSslForSmtp(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
SetUseSslForImap(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error)
UseSslForImap(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
Hostname(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
ImapPort(context.Context, *emptypb.Empty) (*wrapperspb.Int32Value, error)
SmtpPort(context.Context, *emptypb.Empty) (*wrapperspb.Int32Value, error)
@ -848,6 +870,12 @@ func (UnimplementedBridgeServer) SetUseSslForSmtp(context.Context, *wrapperspb.B
func (UnimplementedBridgeServer) UseSslForSmtp(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method UseSslForSmtp not implemented")
}
func (UnimplementedBridgeServer) SetUseSslForImap(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetUseSslForImap not implemented")
}
func (UnimplementedBridgeServer) UseSslForImap(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method UseSslForImap not implemented")
}
func (UnimplementedBridgeServer) Hostname(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method Hostname not implemented")
}
@ -1665,6 +1693,42 @@ func _Bridge_UseSslForSmtp_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler)
}
func _Bridge_SetUseSslForImap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(wrapperspb.BoolValue)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BridgeServer).SetUseSslForImap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.Bridge/SetUseSslForImap",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BridgeServer).SetUseSslForImap(ctx, req.(*wrapperspb.BoolValue))
}
return interceptor(ctx, in, info, handler)
}
func _Bridge_UseSslForImap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BridgeServer).UseSslForImap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.Bridge/UseSslForImap",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BridgeServer).UseSslForImap(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Bridge_Hostname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
@ -2131,6 +2195,14 @@ var Bridge_ServiceDesc = grpc.ServiceDesc{
MethodName: "UseSslForSmtp",
Handler: _Bridge_UseSslForSmtp_Handler,
},
{
MethodName: "SetUseSslForImap",
Handler: _Bridge_SetUseSslForImap_Handler,
},
{
MethodName: "UseSslForImap",
Handler: _Bridge_UseSslForImap_Handler,
},
{
MethodName: "Hostname",
Handler: _Bridge_Hostname_Handler,