Implement Health Check Api.

Implement Health Check Api.

Signed-off-by: naman.gupta <naman.gupta@samsung.com>
Change-Id: Id091fa42eb6df5995f9d5d3995a075a59bb827f9
diff --git a/a1-go/pkg/restful/restful.go b/a1-go/pkg/restful/restful.go
index d8d1e92..44b3422 100644
--- a/a1-go/pkg/restful/restful.go
+++ b/a1-go/pkg/restful/restful.go
@@ -50,6 +50,16 @@
 	}
 
 	api := operations.NewA1API(swaggerSpec)
+
+	api.A1MediatorA1ControllerGetHealthcheckHandler = a1_mediator.A1ControllerGetHealthcheckHandlerFunc(func(param a1_mediator.A1ControllerGetHealthcheckParams) middleware.Responder {
+		a1.Logger.Debug("handler for get Health Check of A1")
+		resp := r.rh.GetA1Health()
+		if resp == false {
+			return a1_mediator.NewA1ControllerGetHealthcheckInternalServerError()
+		}
+		return a1_mediator.NewA1ControllerGetHealthcheckOK()
+	})
+
 	api.A1MediatorA1ControllerGetAllPolicyTypesHandler = a1_mediator.A1ControllerGetAllPolicyTypesHandlerFunc(func(param a1_mediator.A1ControllerGetAllPolicyTypesParams) middleware.Responder {
 		a1.Logger.Debug("handler for get all policy type")
 		return a1_mediator.NewA1ControllerGetAllPolicyTypesOK().WithPayload(r.rh.GetAllPolicyType())