34 lines
735 B
Go Template
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 }}
|
|
}
|