/
api.go
59 lines (53 loc) · 2.7 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* GreekSchools Data Service API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* API version: 0.0.1
* 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 {
ApplicationsGet(http.ResponseWriter, *http.Request)
ApplicationsIdDelete(http.ResponseWriter, *http.Request)
JwtPublicKeysGet(http.ResponseWriter, *http.Request)
JwtRefreshPost(http.ResponseWriter, *http.Request)
StatusGet(http.ResponseWriter, *http.Request)
}
// UsersApiRouter defines the required methods for binding the api requests to a responses for the UsersApi
// The UsersApiRouter implementation should parse necessary information from the http request,
// pass the data to a UsersApiServicer to perform the required actions, then write the service results to the http response.
type UsersApiRouter interface {
UsersGet(http.ResponseWriter, *http.Request)
UsersIdDelete(http.ResponseWriter, *http.Request)
UsersIdGet(http.ResponseWriter, *http.Request)
UsersPost(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 {
ApplicationsGet(context.Context, string) (ImplResponse, error)
ApplicationsIdDelete(context.Context, string, string) (ImplResponse, error)
JwtPublicKeysGet(context.Context) (ImplResponse, error)
JwtRefreshPost(context.Context, string, string, http.ResponseWriter) (ImplResponse, error)
StatusGet(context.Context) (ImplResponse, error)
}
// UsersApiServicer defines the api actions for the UsersApi 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 UsersApiServicer interface {
UsersGet(context.Context, string) (ImplResponse, error)
UsersIdDelete(context.Context, string, string) (ImplResponse, error)
UsersIdGet(context.Context, string, string) (ImplResponse, error)
UsersPost(context.Context, string, User) (ImplResponse, error)
}