Matthieu 'JP' DERASSE 65add2a61d
Some checks failed
continuous-integration/drone/push Build is failing
feat(go-swagger): Refactoring to use go-swagger templating system for most of the work
2023-01-01 17:06:47 +00:00

34 lines
735 B
Go Template

package {{ .Package }}
import (
"context"
"github.com/go-openapi/runtime/middleware"
"{{ index .DefaultImports "models"}}"
api "{{ index .DefaultImports .Package }}"
)
// {{ pascalize .Name }} will {{ .Summary }}.
//
// {{ .Method }} {{ .Path }}
func (m {{ pascalize .Package }}) {{ pascalize .Name }}(ctx context.Context, params api.{{ pascalize .Name }}Params) middleware.Responder {
{{ if eq .Name "getMonPing" }}
return api.NewGetMonPingOK().WithPayload(
&models.MonPing{
Details: &models.MonPingDetails{
AppVersion: "",
GitHash: "",
},
Status: &models.MonPingStatus{
Application: true,
Database: true,
},
},
)
{{ else }}
return middleware.NotImplemented("Not Implemented")
{{ end }}
}