http urls monitor.

12345678910111213141516171819
  1. package handler
  2. import (
  3. "git.links123.net/links123.com/pkg/request"
  4. "git.links123.net/links123.com/monitor_status/service/api"
  5. "github.com/Unknwon/i18n"
  6. "github.com/gin-gonic/gin"
  7. )
  8. // Healthy health check for gin
  9. func Healthy(ctx *gin.Context) {
  10. cp := &api.CommonParams{}
  11. if request.ParseParamFail(ctx, cp) {
  12. return
  13. }
  14. request.Success(ctx, gin.H{"msg": i18n.Tr(cp.TargetStr, "hi", "Paul")})
  15. }