Documentation ¶
Overview ¶
Package http_server provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (*openapi3.Swagger, 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
- type ChiServerOptions
- type ErrorInfo
- type GetUsersParams
- type Limit
- type ListMeta
- type MiddlewareFunc
- type Offset
- type PostTokensRefreshJSONBody
- type PostTokensRefreshJSONRequestBody
- type PostUsersJSONBody
- type PostUsersJSONRequestBody
- type PutUsersMeJSONBody
- type PutUsersMeJSONRequestBody
- type PutUsersUserIDJSONBody
- type PutUsersUserIDJSONRequestBody
- type ServerHTTP
- func (s *ServerHTTP) DeleteUsersMe(w http.ResponseWriter, r *http.Request)
- func (s *ServerHTTP) DeleteUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID)
- func (s *ServerHTTP) GetUsers(w http.ResponseWriter, r *http.Request, params GetUsersParams)
- func (s *ServerHTTP) GetUsersMe(w http.ResponseWriter, r *http.Request)
- func (s *ServerHTTP) GetUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID)
- func (s *ServerHTTP) ListenAndServe()
- func (s *ServerHTTP) PostTokensLogin(w http.ResponseWriter, r *http.Request)
- func (s *ServerHTTP) PostTokensRefresh(w http.ResponseWriter, r *http.Request)
- func (s *ServerHTTP) PostUsers(w http.ResponseWriter, r *http.Request)
- func (s *ServerHTTP) PutUsersMe(w http.ResponseWriter, r *http.Request)
- func (s *ServerHTTP) PutUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID)
- func (s *ServerHTTP) Shutdown()
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DeleteUsersMe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteUsersUserID(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetUsers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetUsersMe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetUsersUserID(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostTokensLogin(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostTokensRefresh(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostUsers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutUsersMe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutUsersUserID(w http.ResponseWriter, r *http.Request)
- type TokenInfo
- type TokenInfos
- type TokenRefresh
- type UserCreate
- type UserID
- type UserInfo
- type UserInfoList
- type UserRole
- type UserUpdate
Constants ¶
const ( AccessTokenScopes = "AccessToken.Scopes" LoginScopes = "Login.Scopes" )
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file.
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 HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
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 GetUsersParams ¶
type GetUsersParams struct { Offset *Offset `json:"Offset,omitempty"` Limit *Limit `json:"Limit,omitempty"` }
GetUsersParams defines parameters for GetUsers.
type ListMeta ¶
type ListMeta struct { Limit int `json:"limit"` Offset int `json:"offset"` Total int `json:"total"` }
ListMeta defines model for ListMeta.
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type PostTokensRefreshJSONBody ¶
type PostTokensRefreshJSONBody TokenRefresh
PostTokensRefreshJSONBody defines parameters for PostTokensRefresh.
type PostTokensRefreshJSONRequestBody ¶
type PostTokensRefreshJSONRequestBody PostTokensRefreshJSONBody
PostTokensRefreshJSONRequestBody defines body for PostTokensRefresh for application/json ContentType.
type PostUsersJSONBody ¶
type PostUsersJSONBody UserCreate
PostUsersJSONBody defines parameters for PostUsers.
type PostUsersJSONRequestBody ¶
type PostUsersJSONRequestBody PostUsersJSONBody
PostUsersJSONRequestBody defines body for PostUsers for application/json ContentType.
type PutUsersMeJSONBody ¶
type PutUsersMeJSONBody UserUpdate
PutUsersMeJSONBody defines parameters for PutUsersMe.
type PutUsersMeJSONRequestBody ¶
type PutUsersMeJSONRequestBody PutUsersMeJSONBody
PutUsersMeJSONRequestBody defines body for PutUsersMe for application/json ContentType.
type PutUsersUserIDJSONBody ¶
type PutUsersUserIDJSONBody UserUpdate
PutUsersUserIDJSONBody defines parameters for PutUsersUserID.
type PutUsersUserIDJSONRequestBody ¶
type PutUsersUserIDJSONRequestBody PutUsersUserIDJSONBody
PutUsersUserIDJSONRequestBody defines body for PutUsersUserID for application/json ContentType.
type ServerHTTP ¶
type ServerHTTP struct {
// contains filtered or unexported fields
}
ServerHTTP
func (*ServerHTTP) DeleteUsersMe ¶
func (s *ServerHTTP) DeleteUsersMe(w http.ResponseWriter, r *http.Request)
Delete me
func (*ServerHTTP) DeleteUsersUserID ¶
func (s *ServerHTTP) DeleteUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID)
Delete a user
func (*ServerHTTP) GetUsers ¶
func (s *ServerHTTP) GetUsers(w http.ResponseWriter, r *http.Request, params GetUsersParams)
List users
func (*ServerHTTP) GetUsersMe ¶
func (s *ServerHTTP) GetUsersMe(w http.ResponseWriter, r *http.Request)
Get me
func (*ServerHTTP) GetUsersUserID ¶
func (s *ServerHTTP) GetUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID)
Get a user
func (*ServerHTTP) ListenAndServe ¶
func (s *ServerHTTP) ListenAndServe()
func (*ServerHTTP) PostTokensLogin ¶
func (s *ServerHTTP) PostTokensLogin(w http.ResponseWriter, r *http.Request)
Login
func (*ServerHTTP) PostTokensRefresh ¶
func (s *ServerHTTP) PostTokensRefresh(w http.ResponseWriter, r *http.Request)
func (*ServerHTTP) PostUsers ¶
func (s *ServerHTTP) PostUsers(w http.ResponseWriter, r *http.Request)
Create a user
func (*ServerHTTP) PutUsersMe ¶
func (s *ServerHTTP) PutUsersMe(w http.ResponseWriter, r *http.Request)
Update me
func (*ServerHTTP) PutUsersUserID ¶
func (s *ServerHTTP) PutUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID)
Update a user
func (*ServerHTTP) Shutdown ¶
func (s *ServerHTTP) Shutdown()
type ServerInterface ¶
type ServerInterface interface { // (POST /tokens/login) PostTokensLogin(w http.ResponseWriter, r *http.Request) // (POST /tokens/refresh) PostTokensRefresh(w http.ResponseWriter, r *http.Request) // (GET /users) GetUsers(w http.ResponseWriter, r *http.Request, params GetUsersParams) // (POST /users) PostUsers(w http.ResponseWriter, r *http.Request) // (DELETE /users/me) DeleteUsersMe(w http.ResponseWriter, r *http.Request) // (GET /users/me) GetUsersMe(w http.ResponseWriter, r *http.Request) // (PUT /users/me) PutUsersMe(w http.ResponseWriter, r *http.Request) // (DELETE /users/{UserID}) DeleteUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID) // (GET /users/{UserID}) GetUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID) // (PUT /users/{UserID}) PutUsersUserID(w http.ResponseWriter, r *http.Request, userID UserID) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) DeleteUsersMe ¶
func (siw *ServerInterfaceWrapper) DeleteUsersMe(w http.ResponseWriter, r *http.Request)
DeleteUsersMe operation middleware
func (*ServerInterfaceWrapper) DeleteUsersUserID ¶
func (siw *ServerInterfaceWrapper) DeleteUsersUserID(w http.ResponseWriter, r *http.Request)
DeleteUsersUserID operation middleware
func (*ServerInterfaceWrapper) GetUsers ¶
func (siw *ServerInterfaceWrapper) GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers operation middleware
func (*ServerInterfaceWrapper) GetUsersMe ¶
func (siw *ServerInterfaceWrapper) GetUsersMe(w http.ResponseWriter, r *http.Request)
GetUsersMe operation middleware
func (*ServerInterfaceWrapper) GetUsersUserID ¶
func (siw *ServerInterfaceWrapper) GetUsersUserID(w http.ResponseWriter, r *http.Request)
GetUsersUserID operation middleware
func (*ServerInterfaceWrapper) PostTokensLogin ¶
func (siw *ServerInterfaceWrapper) PostTokensLogin(w http.ResponseWriter, r *http.Request)
PostTokensLogin operation middleware
func (*ServerInterfaceWrapper) PostTokensRefresh ¶
func (siw *ServerInterfaceWrapper) PostTokensRefresh(w http.ResponseWriter, r *http.Request)
PostTokensRefresh operation middleware
func (*ServerInterfaceWrapper) PostUsers ¶
func (siw *ServerInterfaceWrapper) PostUsers(w http.ResponseWriter, r *http.Request)
PostUsers operation middleware
func (*ServerInterfaceWrapper) PutUsersMe ¶
func (siw *ServerInterfaceWrapper) PutUsersMe(w http.ResponseWriter, r *http.Request)
PutUsersMe operation middleware
func (*ServerInterfaceWrapper) PutUsersUserID ¶
func (siw *ServerInterfaceWrapper) PutUsersUserID(w http.ResponseWriter, r *http.Request)
PutUsersUserID operation middleware
type TokenInfo ¶
type TokenInfo struct { ExpiresAt time.Time `json:"expiresAt"` IssuedAt time.Time `json:"issuedAt"` Token string `json:"token"` }
TokenInfo defines model for TokenInfo.
type TokenInfos ¶
type TokenInfos struct { AccessToken TokenInfo `json:"accessToken"` RefreshToken TokenInfo `json:"refreshToken"` }
TokenInfos defines model for TokenInfos.
type TokenRefresh ¶
type TokenRefresh struct {
RefreshToken string `json:"refreshToken"`
}
TokenRefresh defines model for TokenRefresh.
type UserCreate ¶
type UserCreate struct { Email string `json:"email"` LoginId string `json:"loginId"` Password string `json:"password"` Phone string `json:"phone"` Role UserRole `json:"role"` }
UserCreate defines model for UserCreate.
type UserInfo ¶
type UserInfo struct { Email string `json:"email"` Id string `json:"id"` LoginId string `json:"loginId"` Phone string `json:"phone"` Role UserRole `json:"role"` }
UserInfo defines model for UserInfo.
func UserModelToUserInfo ¶
type UserInfoList ¶
UserInfoList defines model for UserInfoList.