Documentation ¶
Overview ¶
Package auth provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.3 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 MiddlewareFunc
- type OAuth2GoogleCallbackPayload
- type Oauth2GoogleAuthorizationParams
- type Oauth2GoogleCallbackJSONBody
- type Oauth2GoogleCallbackJSONRequestBody
- type RedirectUriQueryParam
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) Oauth2GoogleAuthorization(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Oauth2GoogleCallback(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SigninEmail(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Signout(w http.ResponseWriter, r *http.Request)
- type SigninEmailJSONBody
- type SigninEmailJSONRequestBody
- type SigninEmailPayload
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 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 MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type OAuth2GoogleCallbackPayload ¶
type OAuth2GoogleCallbackPayload struct { // Googleが発行した認可コード Code string `json:"code"` // GoogleOAuth2コールバックURI RedirectUri string `json:"redirectUri"` // CSRF対策用のステートパラメータ State string `json:"state"` }
OAuth2GoogleCallbackPayload defines model for OAuth2GoogleCallbackPayload.
type Oauth2GoogleAuthorizationParams ¶
type Oauth2GoogleAuthorizationParams struct {
RedirectUri RedirectUriQueryParam `json:"redirectUri"`
}
Oauth2GoogleAuthorizationParams defines parameters for Oauth2GoogleAuthorization.
type Oauth2GoogleCallbackJSONBody ¶
type Oauth2GoogleCallbackJSONBody OAuth2GoogleCallbackPayload
Oauth2GoogleCallbackJSONBody defines parameters for Oauth2GoogleCallback.
type Oauth2GoogleCallbackJSONRequestBody ¶
type Oauth2GoogleCallbackJSONRequestBody Oauth2GoogleCallbackJSONBody
Oauth2GoogleCallbackJSONRequestBody defines body for Oauth2GoogleCallback for application/json ContentType.
type RedirectUriQueryParam ¶
type RedirectUriQueryParam string
RedirectUriQueryParam defines model for RedirectUriQueryParam.
type ServerInterface ¶
type ServerInterface interface { // signin to viron with email/password // (POST /email/signin) SigninEmail(w http.ResponseWriter, r *http.Request) // redirect to google oauth // (GET /oauth2/google/authorization) Oauth2GoogleAuthorization(w http.ResponseWriter, r *http.Request, params Oauth2GoogleAuthorizationParams) // callback from google oauth // (POST /oauth2/google/callback) Oauth2GoogleCallback(w http.ResponseWriter, r *http.Request) // signout of viron // (POST /signout) Signout(w http.ResponseWriter, r *http.Request) }
ServerInterface represents all server handlers.
func New ¶
func New() ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) Oauth2GoogleAuthorization ¶
func (siw *ServerInterfaceWrapper) Oauth2GoogleAuthorization(w http.ResponseWriter, r *http.Request)
Oauth2GoogleAuthorization operation middleware
func (*ServerInterfaceWrapper) Oauth2GoogleCallback ¶
func (siw *ServerInterfaceWrapper) Oauth2GoogleCallback(w http.ResponseWriter, r *http.Request)
Oauth2GoogleCallback operation middleware
func (*ServerInterfaceWrapper) SigninEmail ¶
func (siw *ServerInterfaceWrapper) SigninEmail(w http.ResponseWriter, r *http.Request)
SigninEmail operation middleware
func (*ServerInterfaceWrapper) Signout ¶
func (siw *ServerInterfaceWrapper) Signout(w http.ResponseWriter, r *http.Request)
Signout operation middleware
type SigninEmailJSONBody ¶
type SigninEmailJSONBody SigninEmailPayload
SigninEmailJSONBody defines parameters for SigninEmail.
type SigninEmailJSONRequestBody ¶
type SigninEmailJSONRequestBody SigninEmailJSONBody
SigninEmailJSONRequestBody defines body for SigninEmail for application/json ContentType.
type SigninEmailPayload ¶
type SigninEmailPayload struct { // Eメールアドレス Email openapi_types.Email `json:"email"` // パスワード Password string `json:"password"` }
SigninEmailPayload defines model for SigninEmailPayload.