github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/pkg/api/tmpl/chi-interface.tmpl (about) 1 // chi-interface.tmpl based on https://github.com/deepmap/oapi-codegen/tree/master/pkg/codegen/templates 2 3 // ServerInterface represents all server handlers. 4 type ServerInterface interface { 5 {{range .}}{{.SummaryAsComment }}{{$opid := .OperationId}} 6 // ({{.Method}} {{.Path}}) 7 {{.OperationId}}(w http.ResponseWriter, r *http.Request 8 {{- if .HasBody}}{{range .Bodies}}{{if and .Default (eq .NameTag "JSON")}}, body {{$opid}}{{.NameTag}}RequestBody {{end}}{{end}}{{end -}} 9 {{genParamArgs .PathParams}}{{if .RequiresParamObject}}, params {{.OperationId}}Params{{end}}) 10 {{end}} 11 }