Documentation
¶
Overview ¶
Package oapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.1 DO NOT EDIT.
Package oapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.1 DO NOT EDIT.
Package oapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.1 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type ChiServerOptions
- type GetHomeJSONBody
- type GetHomeJSONRequestBody
- type Graduate
- type Labs
- type LoginJSONBody
- type LoginJSONRequestBody
- type LogoutParams
- type MiddlewareFunc
- type OK
- type PostGraduateFixJSONBody
- type PostGraduateFixJSONRequestBody
- type PostGraduateFixParams
- type PostGraduateSaveJSONBody
- type PostGraduateSaveJSONRequestBody
- type PostGraduateSaveParams
- type PostLabFixJSONBody
- type PostLabFixJSONRequestBody
- type PostLabFixParams
- type PostLabSaveJSONBody
- type PostLabSaveJSONRequestBody
- type PostLabSaveParams
- type Professor
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetHome(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Login(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Logout(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostGraduateFix(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostGraduateSave(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostLabFix(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostLabSave(w http.ResponseWriter, r *http.Request)
- type SetCookie
- type User
- type UserId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
}
type GetHomeJSONRequestBody ¶
type GetHomeJSONRequestBody GetHomeJSONBody
GetHomeJSONRequestBody defines body for GetHome for application/json ContentType.
type Labs ¶
type Labs struct {
Name *string `json:"name,omitempty"`
Professors *Professor `json:"professors,omitempty"`
}
Labs defines model for labs.
type LoginJSONRequestBody ¶
type LoginJSONRequestBody LoginJSONBody
LoginJSONRequestBody defines body for Login for application/json ContentType.
type LogoutParams ¶
type LogoutParams struct {
// jwtの情報を入れる
SetCookie *SetCookie `json:"Set-Cookie,omitempty"`
}
LogoutParams defines parameters for Logout.
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type PostGraduateFixJSONBody ¶
type PostGraduateFixJSONBody Graduate
PostGraduateFixJSONBody defines parameters for PostGraduateFix.
type PostGraduateFixJSONRequestBody ¶
type PostGraduateFixJSONRequestBody PostGraduateFixJSONBody
PostGraduateFixJSONRequestBody defines body for PostGraduateFix for application/json ContentType.
type PostGraduateFixParams ¶
type PostGraduateFixParams struct {
// jwtの情報を入れる
SetCookie *SetCookie `json:"Set-Cookie,omitempty"`
}
PostGraduateFixParams defines parameters for PostGraduateFix.
type PostGraduateSaveJSONBody ¶
type PostGraduateSaveJSONBody Graduate
PostGraduateSaveJSONBody defines parameters for PostGraduateSave.
type PostGraduateSaveJSONRequestBody ¶
type PostGraduateSaveJSONRequestBody PostGraduateSaveJSONBody
PostGraduateSaveJSONRequestBody defines body for PostGraduateSave for application/json ContentType.
type PostGraduateSaveParams ¶
type PostGraduateSaveParams struct {
// jwtの情報を入れる
SetCookie *SetCookie `json:"Set-Cookie,omitempty"`
}
PostGraduateSaveParams defines parameters for PostGraduateSave.
type PostLabFixJSONBody ¶
type PostLabFixJSONBody Labs
PostLabFixJSONBody defines parameters for PostLabFix.
type PostLabFixJSONRequestBody ¶
type PostLabFixJSONRequestBody PostLabFixJSONBody
PostLabFixJSONRequestBody defines body for PostLabFix for application/json ContentType.
type PostLabFixParams ¶
type PostLabFixParams struct {
// jwtの情報を入れる
SetCookie *SetCookie `json:"Set-Cookie,omitempty"`
}
PostLabFixParams defines parameters for PostLabFix.
type PostLabSaveJSONBody ¶
type PostLabSaveJSONBody Labs
PostLabSaveJSONBody defines parameters for PostLabSave.
type PostLabSaveJSONRequestBody ¶
type PostLabSaveJSONRequestBody PostLabSaveJSONBody
PostLabSaveJSONRequestBody defines body for PostLabSave for application/json ContentType.
type PostLabSaveParams ¶
type PostLabSaveParams struct {
// jwtの情報を入れる
SetCookie *SetCookie `json:"Set-Cookie,omitempty"`
}
PostLabSaveParams defines parameters for PostLabSave.
type ServerInterface ¶
type ServerInterface interface {
// 進学情報の修正
// (PATCH /graduate/{userId}/fix)
PostGraduateFix(w http.ResponseWriter, r *http.Request, userId UserId, params PostGraduateFixParams)
// 進学情報の保存
// (POST /graduate/{userId}/save)
PostGraduateSave(w http.ResponseWriter, r *http.Request, userId UserId, params PostGraduateSaveParams)
// Your GET endpoint
// (GET /home)
GetHome(w http.ResponseWriter, r *http.Request)
// 研究室調査結果の修正
// (PATCH /lab/{userId}/fix)
PostLabFix(w http.ResponseWriter, r *http.Request, userId UserId, params PostLabFixParams)
// 研究室調査結果の保存
// (POST /lab/{userId}/save)
PostLabSave(w http.ResponseWriter, r *http.Request, userId UserId, params PostLabSaveParams)
// ログイン
// (POST /login)
Login(w http.ResponseWriter, r *http.Request)
// ログアウト
// (GET /logout)
Logout(w http.ResponseWriter, r *http.Request, params LogoutParams)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetHome ¶
func (siw *ServerInterfaceWrapper) GetHome(w http.ResponseWriter, r *http.Request)
GetHome operation middleware
func (*ServerInterfaceWrapper) Login ¶
func (siw *ServerInterfaceWrapper) Login(w http.ResponseWriter, r *http.Request)
Login operation middleware
func (*ServerInterfaceWrapper) Logout ¶
func (siw *ServerInterfaceWrapper) Logout(w http.ResponseWriter, r *http.Request)
Logout operation middleware
func (*ServerInterfaceWrapper) PostGraduateFix ¶
func (siw *ServerInterfaceWrapper) PostGraduateFix(w http.ResponseWriter, r *http.Request)
PostGraduateFix operation middleware
func (*ServerInterfaceWrapper) PostGraduateSave ¶
func (siw *ServerInterfaceWrapper) PostGraduateSave(w http.ResponseWriter, r *http.Request)
PostGraduateSave operation middleware
func (*ServerInterfaceWrapper) PostLabFix ¶
func (siw *ServerInterfaceWrapper) PostLabFix(w http.ResponseWriter, r *http.Request)
PostLabFix operation middleware
func (*ServerInterfaceWrapper) PostLabSave ¶
func (siw *ServerInterfaceWrapper) PostLabSave(w http.ResponseWriter, r *http.Request)
PostLabSave operation middleware