/
api.go
36 lines (32 loc) · 1.36 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* API Title
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* API version: 1.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package openapi
import (
"context"
"net/http"
)
// DefaultApiRouter defines the required methods for binding the api requests to a responses for the DefaultApi
// The DefaultApiRouter implementation should parse necessary information from the http request,
// pass the data to a DefaultApiServicer to perform the required actions, then write the service results to the http response.
type DefaultApiRouter interface {
HealthGet(http.ResponseWriter, *http.Request)
HealthServicePost(http.ResponseWriter, *http.Request)
WakeGet(http.ResponseWriter, *http.Request)
WakePost(http.ResponseWriter, *http.Request)
}
// DefaultApiServicer defines the api actions for the DefaultApi service
// This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API.
type DefaultApiServicer interface {
HealthGet(context.Context) (ImplResponse, error)
HealthServicePost(context.Context, string) (ImplResponse, error)
WakeGet(context.Context) (ImplResponse, error)
WakePost(context.Context) (ImplResponse, error)
}