First prototype

Change-Id: Ieceb55636bda133466609471f25508d0ae83c52c
diff --git a/api_proto/kill_switch_grpc.pb.go b/api_proto/kill_switch_grpc.pb.go
new file mode 100644
index 0000000..d9250b2
--- /dev/null
+++ b/api_proto/kill_switch_grpc.pb.go
@@ -0,0 +1,425 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+
+package api_proto
+
+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
+
+// KillSwitchServiceClient is the client API for KillSwitchService 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 KillSwitchServiceClient interface {
+	GetKillSwitchStatus(ctx context.Context, in *GetKillSwitchStatusRequest, opts ...grpc.CallOption) (*GetKillSwitchStatusResponse, error)
+	GetKillSwitchOverview(ctx context.Context, in *GetKillSwitchOverviewRequest, opts ...grpc.CallOption) (*GetKillSwitchOverviewResponse, error)
+	ListFeatures(ctx context.Context, in *ListFeaturesRequest, opts ...grpc.CallOption) (*ListFeaturesResponse, error)
+	SyncFeatures(ctx context.Context, in *SyncFeaturesRequest, opts ...grpc.CallOption) (*SyncFeaturesResponse, error)
+	EnableKillSwitch(ctx context.Context, in *EnableKillSwitchRequest, opts ...grpc.CallOption) (*EnableKillSwitchResponse, error)
+	DisableKillSwitch(ctx context.Context, in *DisableKillSwitchRequest, opts ...grpc.CallOption) (*DisableKillSwitchResponse, error)
+	ListAuthorizedUsers(ctx context.Context, in *ListAuthorizedUsersRequest, opts ...grpc.CallOption) (*ListAuthorizedUsersResponse, error)
+	AddAuthorizedUser(ctx context.Context, in *AddAuthorizedUserRequest, opts ...grpc.CallOption) (*AddAuthorizedUserResponse, error)
+	UpdateAuthorizedUser(ctx context.Context, in *UpdateAuthorizedUserRequest, opts ...grpc.CallOption) (*UpdateAuthorizedUserResponse, error)
+	DeleteAuthorizedUser(ctx context.Context, in *DeleteAuthorizedUserRequest, opts ...grpc.CallOption) (*DeleteAuthorizedUserResponse, error)
+}
+
+type killSwitchServiceClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewKillSwitchServiceClient(cc grpc.ClientConnInterface) KillSwitchServiceClient {
+	return &killSwitchServiceClient{cc}
+}
+
+func (c *killSwitchServiceClient) GetKillSwitchStatus(ctx context.Context, in *GetKillSwitchStatusRequest, opts ...grpc.CallOption) (*GetKillSwitchStatusResponse, error) {
+	out := new(GetKillSwitchStatusResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/GetKillSwitchStatus", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) GetKillSwitchOverview(ctx context.Context, in *GetKillSwitchOverviewRequest, opts ...grpc.CallOption) (*GetKillSwitchOverviewResponse, error) {
+	out := new(GetKillSwitchOverviewResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/GetKillSwitchOverview", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) ListFeatures(ctx context.Context, in *ListFeaturesRequest, opts ...grpc.CallOption) (*ListFeaturesResponse, error) {
+	out := new(ListFeaturesResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/ListFeatures", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) SyncFeatures(ctx context.Context, in *SyncFeaturesRequest, opts ...grpc.CallOption) (*SyncFeaturesResponse, error) {
+	out := new(SyncFeaturesResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/SyncFeatures", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) EnableKillSwitch(ctx context.Context, in *EnableKillSwitchRequest, opts ...grpc.CallOption) (*EnableKillSwitchResponse, error) {
+	out := new(EnableKillSwitchResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/EnableKillSwitch", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) DisableKillSwitch(ctx context.Context, in *DisableKillSwitchRequest, opts ...grpc.CallOption) (*DisableKillSwitchResponse, error) {
+	out := new(DisableKillSwitchResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/DisableKillSwitch", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) ListAuthorizedUsers(ctx context.Context, in *ListAuthorizedUsersRequest, opts ...grpc.CallOption) (*ListAuthorizedUsersResponse, error) {
+	out := new(ListAuthorizedUsersResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/ListAuthorizedUsers", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) AddAuthorizedUser(ctx context.Context, in *AddAuthorizedUserRequest, opts ...grpc.CallOption) (*AddAuthorizedUserResponse, error) {
+	out := new(AddAuthorizedUserResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/AddAuthorizedUser", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) UpdateAuthorizedUser(ctx context.Context, in *UpdateAuthorizedUserRequest, opts ...grpc.CallOption) (*UpdateAuthorizedUserResponse, error) {
+	out := new(UpdateAuthorizedUserResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/UpdateAuthorizedUser", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *killSwitchServiceClient) DeleteAuthorizedUser(ctx context.Context, in *DeleteAuthorizedUserRequest, opts ...grpc.CallOption) (*DeleteAuthorizedUserResponse, error) {
+	out := new(DeleteAuthorizedUserResponse)
+	err := c.cc.Invoke(ctx, "/KillSwitchService/DeleteAuthorizedUser", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// KillSwitchServiceServer is the server API for KillSwitchService service.
+// All implementations must embed UnimplementedKillSwitchServiceServer
+// for forward compatibility
+type KillSwitchServiceServer interface {
+	GetKillSwitchStatus(context.Context, *GetKillSwitchStatusRequest) (*GetKillSwitchStatusResponse, error)
+	GetKillSwitchOverview(context.Context, *GetKillSwitchOverviewRequest) (*GetKillSwitchOverviewResponse, error)
+	ListFeatures(context.Context, *ListFeaturesRequest) (*ListFeaturesResponse, error)
+	SyncFeatures(context.Context, *SyncFeaturesRequest) (*SyncFeaturesResponse, error)
+	EnableKillSwitch(context.Context, *EnableKillSwitchRequest) (*EnableKillSwitchResponse, error)
+	DisableKillSwitch(context.Context, *DisableKillSwitchRequest) (*DisableKillSwitchResponse, error)
+	ListAuthorizedUsers(context.Context, *ListAuthorizedUsersRequest) (*ListAuthorizedUsersResponse, error)
+	AddAuthorizedUser(context.Context, *AddAuthorizedUserRequest) (*AddAuthorizedUserResponse, error)
+	UpdateAuthorizedUser(context.Context, *UpdateAuthorizedUserRequest) (*UpdateAuthorizedUserResponse, error)
+	DeleteAuthorizedUser(context.Context, *DeleteAuthorizedUserRequest) (*DeleteAuthorizedUserResponse, error)
+	mustEmbedUnimplementedKillSwitchServiceServer()
+}
+
+// UnimplementedKillSwitchServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedKillSwitchServiceServer struct {
+}
+
+func (UnimplementedKillSwitchServiceServer) GetKillSwitchStatus(context.Context, *GetKillSwitchStatusRequest) (*GetKillSwitchStatusResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetKillSwitchStatus not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) GetKillSwitchOverview(context.Context, *GetKillSwitchOverviewRequest) (*GetKillSwitchOverviewResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetKillSwitchOverview not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) ListFeatures(context.Context, *ListFeaturesRequest) (*ListFeaturesResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ListFeatures not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) SyncFeatures(context.Context, *SyncFeaturesRequest) (*SyncFeaturesResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SyncFeatures not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) EnableKillSwitch(context.Context, *EnableKillSwitchRequest) (*EnableKillSwitchResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method EnableKillSwitch not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) DisableKillSwitch(context.Context, *DisableKillSwitchRequest) (*DisableKillSwitchResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DisableKillSwitch not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) ListAuthorizedUsers(context.Context, *ListAuthorizedUsersRequest) (*ListAuthorizedUsersResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ListAuthorizedUsers not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) AddAuthorizedUser(context.Context, *AddAuthorizedUserRequest) (*AddAuthorizedUserResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method AddAuthorizedUser not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) UpdateAuthorizedUser(context.Context, *UpdateAuthorizedUserRequest) (*UpdateAuthorizedUserResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UpdateAuthorizedUser not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) DeleteAuthorizedUser(context.Context, *DeleteAuthorizedUserRequest) (*DeleteAuthorizedUserResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DeleteAuthorizedUser not implemented")
+}
+func (UnimplementedKillSwitchServiceServer) mustEmbedUnimplementedKillSwitchServiceServer() {}
+
+// UnsafeKillSwitchServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to KillSwitchServiceServer will
+// result in compilation errors.
+type UnsafeKillSwitchServiceServer interface {
+	mustEmbedUnimplementedKillSwitchServiceServer()
+}
+
+func RegisterKillSwitchServiceServer(s grpc.ServiceRegistrar, srv KillSwitchServiceServer) {
+	s.RegisterService(&KillSwitchService_ServiceDesc, srv)
+}
+
+func _KillSwitchService_GetKillSwitchStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetKillSwitchStatusRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).GetKillSwitchStatus(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/GetKillSwitchStatus",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).GetKillSwitchStatus(ctx, req.(*GetKillSwitchStatusRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_GetKillSwitchOverview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetKillSwitchOverviewRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).GetKillSwitchOverview(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/GetKillSwitchOverview",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).GetKillSwitchOverview(ctx, req.(*GetKillSwitchOverviewRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_ListFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ListFeaturesRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).ListFeatures(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/ListFeatures",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).ListFeatures(ctx, req.(*ListFeaturesRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_SyncFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SyncFeaturesRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).SyncFeatures(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/SyncFeatures",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).SyncFeatures(ctx, req.(*SyncFeaturesRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_EnableKillSwitch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(EnableKillSwitchRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).EnableKillSwitch(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/EnableKillSwitch",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).EnableKillSwitch(ctx, req.(*EnableKillSwitchRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_DisableKillSwitch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DisableKillSwitchRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).DisableKillSwitch(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/DisableKillSwitch",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).DisableKillSwitch(ctx, req.(*DisableKillSwitchRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_ListAuthorizedUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ListAuthorizedUsersRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).ListAuthorizedUsers(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/ListAuthorizedUsers",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).ListAuthorizedUsers(ctx, req.(*ListAuthorizedUsersRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_AddAuthorizedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(AddAuthorizedUserRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).AddAuthorizedUser(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/AddAuthorizedUser",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).AddAuthorizedUser(ctx, req.(*AddAuthorizedUserRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_UpdateAuthorizedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UpdateAuthorizedUserRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).UpdateAuthorizedUser(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/UpdateAuthorizedUser",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).UpdateAuthorizedUser(ctx, req.(*UpdateAuthorizedUserRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _KillSwitchService_DeleteAuthorizedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DeleteAuthorizedUserRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KillSwitchServiceServer).DeleteAuthorizedUser(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/KillSwitchService/DeleteAuthorizedUser",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KillSwitchServiceServer).DeleteAuthorizedUser(ctx, req.(*DeleteAuthorizedUserRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// KillSwitchService_ServiceDesc is the grpc.ServiceDesc for KillSwitchService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var KillSwitchService_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "KillSwitchService",
+	HandlerType: (*KillSwitchServiceServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "GetKillSwitchStatus",
+			Handler:    _KillSwitchService_GetKillSwitchStatus_Handler,
+		},
+		{
+			MethodName: "GetKillSwitchOverview",
+			Handler:    _KillSwitchService_GetKillSwitchOverview_Handler,
+		},
+		{
+			MethodName: "ListFeatures",
+			Handler:    _KillSwitchService_ListFeatures_Handler,
+		},
+		{
+			MethodName: "SyncFeatures",
+			Handler:    _KillSwitchService_SyncFeatures_Handler,
+		},
+		{
+			MethodName: "EnableKillSwitch",
+			Handler:    _KillSwitchService_EnableKillSwitch_Handler,
+		},
+		{
+			MethodName: "DisableKillSwitch",
+			Handler:    _KillSwitchService_DisableKillSwitch_Handler,
+		},
+		{
+			MethodName: "ListAuthorizedUsers",
+			Handler:    _KillSwitchService_ListAuthorizedUsers_Handler,
+		},
+		{
+			MethodName: "AddAuthorizedUser",
+			Handler:    _KillSwitchService_AddAuthorizedUser_Handler,
+		},
+		{
+			MethodName: "UpdateAuthorizedUser",
+			Handler:    _KillSwitchService_UpdateAuthorizedUser_Handler,
+		},
+		{
+			MethodName: "DeleteAuthorizedUser",
+			Handler:    _KillSwitchService_DeleteAuthorizedUser_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "api_proto/kill_switch.proto",
+}