Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version (devel) DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version (devel) DO NOT EDIT.
Index ¶
- Constants
- Variables
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type CreatePATRequest
- type CreatePATResponse
- type ErrorResponse
- type ErrorResponseError
- type GetHealthz200JSONResponse
- type GetHealthzRequestObject
- type GetHealthzResponseObject
- type GetVersion200JSONResponse
- type GetVersionRequestObject
- type GetVersionResponseObject
- type GinServerOptions
- type HeadHealthz200Response
- type HeadHealthzRequestObject
- type HeadHealthzResponseObject
- type MFAChallengePayload
- type MiddlewareFunc
- type OKResponse
- type OptionsRedirectTo
- type PostPat200JSONResponse
- type PostPatJSONRequestBody
- type PostPatRequestObject
- type PostPatResponseObject
- type PostSigninEmailPassword200JSONResponse
- type PostSigninEmailPasswordJSONRequestBody
- type PostSigninEmailPasswordRequestObject
- type PostSigninEmailPasswordResponseObject
- type PostSigninPasswordlessEmail200JSONResponse
- type PostSigninPasswordlessEmailJSONRequestBody
- type PostSigninPasswordlessEmailRequestObject
- type PostSigninPasswordlessEmailResponseObject
- type PostSigninPat200JSONResponse
- type PostSigninPatJSONRequestBody
- type PostSigninPatRequestObject
- type PostSigninPatResponseObject
- type PostSignupEmailPassword200JSONResponse
- type PostSignupEmailPassword403JSONResponse
- type PostSignupEmailPassword409JSONResponse
- type PostSignupEmailPasswordJSONRequestBody
- type PostSignupEmailPasswordRequestObject
- type PostSignupEmailPasswordResponseObject
- type PostSignupWebauthn200JSONResponse
- type PostSignupWebauthnJSONRequestBody
- type PostSignupWebauthnRequestObject
- type PostSignupWebauthnResponseObject
- type PostSignupWebauthnVerify200JSONResponse
- type PostSignupWebauthnVerifyJSONRequestBody
- type PostSignupWebauthnVerifyRequestObject
- type PostSignupWebauthnVerifyResponseObject
- type PostToken200JSONResponse
- type PostTokenJSONRequestBody
- type PostTokenRequestObject
- type PostTokenResponseObject
- type PostUserDeanonymize200JSONResponse
- type PostUserDeanonymizeJSONRequestBody
- type PostUserDeanonymizeRequestObject
- type PostUserDeanonymizeResponseObject
- type PostUserEmailChange200JSONResponse
- type PostUserEmailChangeJSONRequestBody
- type PostUserEmailChangeRequestObject
- type PostUserEmailChangeResponseObject
- type PostUserEmailSendVerificationEmail200JSONResponse
- type PostUserEmailSendVerificationEmailJSONRequestBody
- type PostUserEmailSendVerificationEmailRequestObject
- type PostUserEmailSendVerificationEmailResponseObject
- type PostUserPasswordReset200JSONResponse
- type PostUserPasswordResetJSONRequestBody
- type PostUserPasswordResetRequestObject
- type PostUserPasswordResetResponseObject
- type RefreshTokenRequest
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetHealthz(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetVersion(c *gin.Context)
- func (siw *ServerInterfaceWrapper) HeadHealthz(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostPat(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostSigninEmailPassword(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostSigninPasswordlessEmail(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostSigninPat(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostSignupEmailPassword(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostSignupWebauthn(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostSignupWebauthnVerify(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostToken(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostUserDeanonymize(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostUserEmailChange(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostUserEmailSendVerificationEmail(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostUserPasswordReset(c *gin.Context)
- type Session
- type SessionPayload
- type SignInEmailPasswordRequest
- type SignInEmailPasswordResponse
- type SignInPATRequest
- type SignInPasswordlessEmailRequest
- type SignUpEmailPasswordRequest
- type SignUpOptions
- type SignUpWebauthnRequest
- type SignUpWebauthnResponse
- type SignUpWebauthnVerifyRequest
- func (a SignUpWebauthnVerifyRequest) Get(fieldName string) (value interface{}, found bool)
- func (a SignUpWebauthnVerifyRequest) MarshalJSON() ([]byte, error)
- func (a *SignUpWebauthnVerifyRequest) Set(fieldName string, value interface{})
- func (a *SignUpWebauthnVerifyRequest) UnmarshalJSON(b []byte) error
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type User
- type UserDeanonymizeRequest
- type UserDeanonymizeRequestSignInMethod
- type UserEmailChangeRequest
- type UserEmailSendVerificationEmailRequest
- type UserPasswordResetRequest
Constants ¶
const ( BearerAuthScopes = "BearerAuth.Scopes" BearerAuthElevatedScopes = "BearerAuthElevated.Scopes" )
Variables ¶
var OpenAPISchema []byte
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 PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type CreatePATRequest ¶ added in v0.28.0
type CreatePATRequest struct { // ExpiresAt Expiration date of the PAT ExpiresAt time.Time `json:"expiresAt"` Metadata *map[string]interface{} `json:"metadata,omitempty"` }
CreatePATRequest defines model for CreatePATRequest.
type CreatePATResponse ¶ added in v0.28.0
type CreatePATResponse struct { // Id ID of the PAT Id string `json:"id"` // PersonalAccessToken PAT PersonalAccessToken string `json:"personalAccessToken"` }
CreatePATResponse defines model for CreatePATResponse.
type ErrorResponse ¶
type ErrorResponse struct { // Error Error code that identifies the application error Error ErrorResponseError `json:"error"` // Message Human friendly error message Message string `json:"message"` // Status HTTP status error code Status int `json:"status"` }
ErrorResponse defines model for ErrorResponse.
type ErrorResponseError ¶
type ErrorResponseError string
ErrorResponseError Error code that identifies the application error
const ( DefaultRoleMustBeInAllowedRoles ErrorResponseError = "default-role-must-be-in-allowed-roles" DisabledEndpoint ErrorResponseError = "disabled-endpoint" DisabledUser ErrorResponseError = "disabled-user" EmailAlreadyInUse ErrorResponseError = "email-already-in-use" EmailAlreadyVerified ErrorResponseError = "email-already-verified" ForbiddenAnonymous ErrorResponseError = "forbidden-anonymous" InternalServerError ErrorResponseError = "internal-server-error" InvalidEmailPassword ErrorResponseError = "invalid-email-password" InvalidPat ErrorResponseError = "invalid-pat" InvalidRefreshToken ErrorResponseError = "invalid-refresh-token" InvalidRequest ErrorResponseError = "invalid-request" LocaleNotAllowed ErrorResponseError = "locale-not-allowed" PasswordInHibpDatabase ErrorResponseError = "password-in-hibp-database" PasswordTooShort ErrorResponseError = "password-too-short" RedirectToNotAllowed ErrorResponseError = "redirectTo-not-allowed" RoleNotAllowed ErrorResponseError = "role-not-allowed" SignupDisabled ErrorResponseError = "signup-disabled" UnverifiedUser ErrorResponseError = "unverified-user" UserNotAnonymous ErrorResponseError = "user-not-anonymous" )
Defines values for ErrorResponseError.
type GetHealthz200JSONResponse ¶ added in v0.28.0
type GetHealthz200JSONResponse OKResponse
func (GetHealthz200JSONResponse) VisitGetHealthzResponse ¶ added in v0.28.0
func (response GetHealthz200JSONResponse) VisitGetHealthzResponse(w http.ResponseWriter) error
type GetHealthzRequestObject ¶ added in v0.28.0
type GetHealthzRequestObject struct { }
type GetHealthzResponseObject ¶ added in v0.28.0
type GetHealthzResponseObject interface {
VisitGetHealthzResponse(w http.ResponseWriter) error
}
type GetVersion200JSONResponse ¶ added in v0.28.0
type GetVersion200JSONResponse struct {
Version string `json:"version"`
}
func (GetVersion200JSONResponse) VisitGetVersionResponse ¶ added in v0.28.0
func (response GetVersion200JSONResponse) VisitGetVersionResponse(w http.ResponseWriter) error
type GetVersionRequestObject ¶ added in v0.28.0
type GetVersionRequestObject struct { }
type GetVersionResponseObject ¶ added in v0.28.0
type GetVersionResponseObject interface {
VisitGetVersionResponse(w http.ResponseWriter) error
}
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type HeadHealthz200Response ¶ added in v0.28.0
type HeadHealthz200Response struct { }
func (HeadHealthz200Response) VisitHeadHealthzResponse ¶ added in v0.28.0
func (response HeadHealthz200Response) VisitHeadHealthzResponse(w http.ResponseWriter) error
type HeadHealthzRequestObject ¶ added in v0.28.0
type HeadHealthzRequestObject struct { }
type HeadHealthzResponseObject ¶ added in v0.28.0
type HeadHealthzResponseObject interface {
VisitHeadHealthzResponse(w http.ResponseWriter) error
}
type MFAChallengePayload ¶ added in v0.28.0
type MFAChallengePayload struct {
Ticket string `json:"ticket"`
}
MFAChallengePayload defines model for MFAChallengePayload.
type MiddlewareFunc ¶
type OKResponse ¶ added in v0.28.0
type OKResponse string
OKResponse defines model for OKResponse.
const (
OK OKResponse = "OK"
)
Defines values for OKResponse.
type OptionsRedirectTo ¶ added in v0.28.0
type OptionsRedirectTo struct {
RedirectTo *string `json:"redirectTo,omitempty"`
}
OptionsRedirectTo defines model for OptionsRedirectTo.
type PostPat200JSONResponse ¶ added in v0.28.0
type PostPat200JSONResponse CreatePATResponse
func (PostPat200JSONResponse) VisitPostPatResponse ¶ added in v0.28.0
func (response PostPat200JSONResponse) VisitPostPatResponse(w http.ResponseWriter) error
type PostPatJSONRequestBody ¶ added in v0.28.0
type PostPatJSONRequestBody = CreatePATRequest
PostPatJSONRequestBody defines body for PostPat for application/json ContentType.
type PostPatRequestObject ¶ added in v0.28.0
type PostPatRequestObject struct {
Body *PostPatJSONRequestBody
}
type PostPatResponseObject ¶ added in v0.28.0
type PostPatResponseObject interface {
VisitPostPatResponse(w http.ResponseWriter) error
}
type PostSigninEmailPassword200JSONResponse ¶ added in v0.28.0
type PostSigninEmailPassword200JSONResponse SignInEmailPasswordResponse
func (PostSigninEmailPassword200JSONResponse) VisitPostSigninEmailPasswordResponse ¶ added in v0.28.0
func (response PostSigninEmailPassword200JSONResponse) VisitPostSigninEmailPasswordResponse(w http.ResponseWriter) error
type PostSigninEmailPasswordJSONRequestBody ¶ added in v0.28.0
type PostSigninEmailPasswordJSONRequestBody = SignInEmailPasswordRequest
PostSigninEmailPasswordJSONRequestBody defines body for PostSigninEmailPassword for application/json ContentType.
type PostSigninEmailPasswordRequestObject ¶ added in v0.28.0
type PostSigninEmailPasswordRequestObject struct {
Body *PostSigninEmailPasswordJSONRequestBody
}
type PostSigninEmailPasswordResponseObject ¶ added in v0.28.0
type PostSigninEmailPasswordResponseObject interface {
VisitPostSigninEmailPasswordResponse(w http.ResponseWriter) error
}
type PostSigninPasswordlessEmail200JSONResponse ¶ added in v0.28.0
type PostSigninPasswordlessEmail200JSONResponse OKResponse
func (PostSigninPasswordlessEmail200JSONResponse) VisitPostSigninPasswordlessEmailResponse ¶ added in v0.28.0
func (response PostSigninPasswordlessEmail200JSONResponse) VisitPostSigninPasswordlessEmailResponse(w http.ResponseWriter) error
type PostSigninPasswordlessEmailJSONRequestBody ¶ added in v0.28.0
type PostSigninPasswordlessEmailJSONRequestBody = SignInPasswordlessEmailRequest
PostSigninPasswordlessEmailJSONRequestBody defines body for PostSigninPasswordlessEmail for application/json ContentType.
type PostSigninPasswordlessEmailRequestObject ¶ added in v0.28.0
type PostSigninPasswordlessEmailRequestObject struct {
Body *PostSigninPasswordlessEmailJSONRequestBody
}
type PostSigninPasswordlessEmailResponseObject ¶ added in v0.28.0
type PostSigninPasswordlessEmailResponseObject interface {
VisitPostSigninPasswordlessEmailResponse(w http.ResponseWriter) error
}
type PostSigninPat200JSONResponse ¶ added in v0.28.0
type PostSigninPat200JSONResponse SessionPayload
func (PostSigninPat200JSONResponse) VisitPostSigninPatResponse ¶ added in v0.28.0
func (response PostSigninPat200JSONResponse) VisitPostSigninPatResponse(w http.ResponseWriter) error
type PostSigninPatJSONRequestBody ¶ added in v0.28.0
type PostSigninPatJSONRequestBody = SignInPATRequest
PostSigninPatJSONRequestBody defines body for PostSigninPat for application/json ContentType.
type PostSigninPatRequestObject ¶ added in v0.28.0
type PostSigninPatRequestObject struct {
Body *PostSigninPatJSONRequestBody
}
type PostSigninPatResponseObject ¶ added in v0.28.0
type PostSigninPatResponseObject interface {
VisitPostSigninPatResponse(w http.ResponseWriter) error
}
type PostSignupEmailPassword200JSONResponse ¶
type PostSignupEmailPassword200JSONResponse SessionPayload
func (PostSignupEmailPassword200JSONResponse) VisitPostSignupEmailPasswordResponse ¶
func (response PostSignupEmailPassword200JSONResponse) VisitPostSignupEmailPasswordResponse(w http.ResponseWriter) error
type PostSignupEmailPassword403JSONResponse ¶
type PostSignupEmailPassword403JSONResponse ErrorResponse
func (PostSignupEmailPassword403JSONResponse) VisitPostSignupEmailPasswordResponse ¶
func (response PostSignupEmailPassword403JSONResponse) VisitPostSignupEmailPasswordResponse(w http.ResponseWriter) error
type PostSignupEmailPassword409JSONResponse ¶
type PostSignupEmailPassword409JSONResponse ErrorResponse
func (PostSignupEmailPassword409JSONResponse) VisitPostSignupEmailPasswordResponse ¶
func (response PostSignupEmailPassword409JSONResponse) VisitPostSignupEmailPasswordResponse(w http.ResponseWriter) error
type PostSignupEmailPasswordJSONRequestBody ¶
type PostSignupEmailPasswordJSONRequestBody = SignUpEmailPasswordRequest
PostSignupEmailPasswordJSONRequestBody defines body for PostSignupEmailPassword for application/json ContentType.
type PostSignupEmailPasswordRequestObject ¶
type PostSignupEmailPasswordRequestObject struct {
Body *PostSignupEmailPasswordJSONRequestBody
}
type PostSignupEmailPasswordResponseObject ¶
type PostSignupEmailPasswordResponseObject interface {
VisitPostSignupEmailPasswordResponse(w http.ResponseWriter) error
}
type PostSignupWebauthn200JSONResponse ¶ added in v0.28.0
type PostSignupWebauthn200JSONResponse SignUpWebauthnResponse
func (PostSignupWebauthn200JSONResponse) VisitPostSignupWebauthnResponse ¶ added in v0.28.0
func (response PostSignupWebauthn200JSONResponse) VisitPostSignupWebauthnResponse(w http.ResponseWriter) error
type PostSignupWebauthnJSONRequestBody ¶ added in v0.28.0
type PostSignupWebauthnJSONRequestBody = SignUpWebauthnRequest
PostSignupWebauthnJSONRequestBody defines body for PostSignupWebauthn for application/json ContentType.
type PostSignupWebauthnRequestObject ¶ added in v0.28.0
type PostSignupWebauthnRequestObject struct {
Body *PostSignupWebauthnJSONRequestBody
}
type PostSignupWebauthnResponseObject ¶ added in v0.28.0
type PostSignupWebauthnResponseObject interface {
VisitPostSignupWebauthnResponse(w http.ResponseWriter) error
}
type PostSignupWebauthnVerify200JSONResponse ¶ added in v0.28.0
type PostSignupWebauthnVerify200JSONResponse SessionPayload
func (PostSignupWebauthnVerify200JSONResponse) VisitPostSignupWebauthnVerifyResponse ¶ added in v0.28.0
func (response PostSignupWebauthnVerify200JSONResponse) VisitPostSignupWebauthnVerifyResponse(w http.ResponseWriter) error
type PostSignupWebauthnVerifyJSONRequestBody ¶ added in v0.28.0
type PostSignupWebauthnVerifyJSONRequestBody = SignUpWebauthnVerifyRequest
PostSignupWebauthnVerifyJSONRequestBody defines body for PostSignupWebauthnVerify for application/json ContentType.
type PostSignupWebauthnVerifyRequestObject ¶ added in v0.28.0
type PostSignupWebauthnVerifyRequestObject struct {
Body *PostSignupWebauthnVerifyJSONRequestBody
}
type PostSignupWebauthnVerifyResponseObject ¶ added in v0.28.0
type PostSignupWebauthnVerifyResponseObject interface {
VisitPostSignupWebauthnVerifyResponse(w http.ResponseWriter) error
}
type PostToken200JSONResponse ¶ added in v0.29.0
type PostToken200JSONResponse Session
func (PostToken200JSONResponse) VisitPostTokenResponse ¶ added in v0.29.0
func (response PostToken200JSONResponse) VisitPostTokenResponse(w http.ResponseWriter) error
type PostTokenJSONRequestBody ¶ added in v0.29.0
type PostTokenJSONRequestBody = RefreshTokenRequest
PostTokenJSONRequestBody defines body for PostToken for application/json ContentType.
type PostTokenRequestObject ¶ added in v0.29.0
type PostTokenRequestObject struct {
Body *PostTokenJSONRequestBody
}
type PostTokenResponseObject ¶ added in v0.29.0
type PostTokenResponseObject interface {
VisitPostTokenResponse(w http.ResponseWriter) error
}
type PostUserDeanonymize200JSONResponse ¶ added in v0.28.0
type PostUserDeanonymize200JSONResponse OKResponse
func (PostUserDeanonymize200JSONResponse) VisitPostUserDeanonymizeResponse ¶ added in v0.28.0
func (response PostUserDeanonymize200JSONResponse) VisitPostUserDeanonymizeResponse(w http.ResponseWriter) error
type PostUserDeanonymizeJSONRequestBody ¶ added in v0.28.0
type PostUserDeanonymizeJSONRequestBody = UserDeanonymizeRequest
PostUserDeanonymizeJSONRequestBody defines body for PostUserDeanonymize for application/json ContentType.
type PostUserDeanonymizeRequestObject ¶ added in v0.28.0
type PostUserDeanonymizeRequestObject struct {
Body *PostUserDeanonymizeJSONRequestBody
}
type PostUserDeanonymizeResponseObject ¶ added in v0.28.0
type PostUserDeanonymizeResponseObject interface {
VisitPostUserDeanonymizeResponse(w http.ResponseWriter) error
}
type PostUserEmailChange200JSONResponse ¶ added in v0.28.0
type PostUserEmailChange200JSONResponse OKResponse
func (PostUserEmailChange200JSONResponse) VisitPostUserEmailChangeResponse ¶ added in v0.28.0
func (response PostUserEmailChange200JSONResponse) VisitPostUserEmailChangeResponse(w http.ResponseWriter) error
type PostUserEmailChangeJSONRequestBody ¶ added in v0.28.0
type PostUserEmailChangeJSONRequestBody = UserEmailChangeRequest
PostUserEmailChangeJSONRequestBody defines body for PostUserEmailChange for application/json ContentType.
type PostUserEmailChangeRequestObject ¶ added in v0.28.0
type PostUserEmailChangeRequestObject struct {
Body *PostUserEmailChangeJSONRequestBody
}
type PostUserEmailChangeResponseObject ¶ added in v0.28.0
type PostUserEmailChangeResponseObject interface {
VisitPostUserEmailChangeResponse(w http.ResponseWriter) error
}
type PostUserEmailSendVerificationEmail200JSONResponse ¶ added in v0.28.0
type PostUserEmailSendVerificationEmail200JSONResponse OKResponse
func (PostUserEmailSendVerificationEmail200JSONResponse) VisitPostUserEmailSendVerificationEmailResponse ¶ added in v0.28.0
func (response PostUserEmailSendVerificationEmail200JSONResponse) VisitPostUserEmailSendVerificationEmailResponse(w http.ResponseWriter) error
type PostUserEmailSendVerificationEmailJSONRequestBody ¶ added in v0.28.0
type PostUserEmailSendVerificationEmailJSONRequestBody = UserEmailSendVerificationEmailRequest
PostUserEmailSendVerificationEmailJSONRequestBody defines body for PostUserEmailSendVerificationEmail for application/json ContentType.
type PostUserEmailSendVerificationEmailRequestObject ¶ added in v0.28.0
type PostUserEmailSendVerificationEmailRequestObject struct {
Body *PostUserEmailSendVerificationEmailJSONRequestBody
}
type PostUserEmailSendVerificationEmailResponseObject ¶ added in v0.28.0
type PostUserEmailSendVerificationEmailResponseObject interface {
VisitPostUserEmailSendVerificationEmailResponse(w http.ResponseWriter) error
}
type PostUserPasswordReset200JSONResponse ¶ added in v0.28.0
type PostUserPasswordReset200JSONResponse OKResponse
func (PostUserPasswordReset200JSONResponse) VisitPostUserPasswordResetResponse ¶ added in v0.28.0
func (response PostUserPasswordReset200JSONResponse) VisitPostUserPasswordResetResponse(w http.ResponseWriter) error
type PostUserPasswordResetJSONRequestBody ¶ added in v0.28.0
type PostUserPasswordResetJSONRequestBody = UserPasswordResetRequest
PostUserPasswordResetJSONRequestBody defines body for PostUserPasswordReset for application/json ContentType.
type PostUserPasswordResetRequestObject ¶ added in v0.28.0
type PostUserPasswordResetRequestObject struct {
Body *PostUserPasswordResetJSONRequestBody
}
type PostUserPasswordResetResponseObject ¶ added in v0.28.0
type PostUserPasswordResetResponseObject interface {
VisitPostUserPasswordResetResponse(w http.ResponseWriter) error
}
type RefreshTokenRequest ¶ added in v0.29.0
type RefreshTokenRequest struct { // RefreshToken Refresh Token RefreshToken string `json:"refreshToken"` }
RefreshTokenRequest defines model for RefreshTokenRequest.
type ServerInterface ¶
type ServerInterface interface { // Health check // (GET /healthz) GetHealthz(c *gin.Context) // Health check // (HEAD /healthz) HeadHealthz(c *gin.Context) // Create a Personal Access Token (PAT) // (POST /pat) PostPat(c *gin.Context) // Sign in with email and password // (POST /signin/email-password) PostSigninEmailPassword(c *gin.Context) // Sign in with magic link sent to user's email. If user doesn't exist, it will be created. The options object is optional and can be used to set the user's when signing up a new user. It is ignored if the user already exists. // (POST /signin/passwordless/email) PostSigninPasswordlessEmail(c *gin.Context) // Sign in with Personal Access Token (PAT) // (POST /signin/pat) PostSigninPat(c *gin.Context) // Signup with email and password // (POST /signup/email-password) PostSignupEmailPassword(c *gin.Context) // Signup with webauthn // (POST /signup/webauthn) PostSignupWebauthn(c *gin.Context) // Verify webauthn signup // (POST /signup/webauthn/verify) PostSignupWebauthnVerify(c *gin.Context) // Refresh the JWT access token // (POST /token) PostToken(c *gin.Context) // Deanonymize an anonymous user in adding missing email or email+password, depending on the chosen authentication method. Will send a confirmation email if the server is configured to do so // (POST /user/deanonymize) PostUserDeanonymize(c *gin.Context) // Change user email // (POST /user/email/change) PostUserEmailChange(c *gin.Context) // Send email verification email // (POST /user/email/send-verification-email) PostUserEmailSendVerificationEmail(c *gin.Context) // Request a password reset. An email with a verification link will be sent to the user's address // (POST /user/password/reset) PostUserPasswordReset(c *gin.Context) // Get version // (GET /version) GetVersion(c *gin.Context) }
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetHealthz ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) GetHealthz(c *gin.Context)
GetHealthz operation middleware
func (*ServerInterfaceWrapper) GetVersion ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) GetVersion(c *gin.Context)
GetVersion operation middleware
func (*ServerInterfaceWrapper) HeadHealthz ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) HeadHealthz(c *gin.Context)
HeadHealthz operation middleware
func (*ServerInterfaceWrapper) PostPat ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostPat(c *gin.Context)
PostPat operation middleware
func (*ServerInterfaceWrapper) PostSigninEmailPassword ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostSigninEmailPassword(c *gin.Context)
PostSigninEmailPassword operation middleware
func (*ServerInterfaceWrapper) PostSigninPasswordlessEmail ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostSigninPasswordlessEmail(c *gin.Context)
PostSigninPasswordlessEmail operation middleware
func (*ServerInterfaceWrapper) PostSigninPat ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostSigninPat(c *gin.Context)
PostSigninPat operation middleware
func (*ServerInterfaceWrapper) PostSignupEmailPassword ¶
func (siw *ServerInterfaceWrapper) PostSignupEmailPassword(c *gin.Context)
PostSignupEmailPassword operation middleware
func (*ServerInterfaceWrapper) PostSignupWebauthn ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostSignupWebauthn(c *gin.Context)
PostSignupWebauthn operation middleware
func (*ServerInterfaceWrapper) PostSignupWebauthnVerify ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostSignupWebauthnVerify(c *gin.Context)
PostSignupWebauthnVerify operation middleware
func (*ServerInterfaceWrapper) PostToken ¶ added in v0.29.0
func (siw *ServerInterfaceWrapper) PostToken(c *gin.Context)
PostToken operation middleware
func (*ServerInterfaceWrapper) PostUserDeanonymize ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostUserDeanonymize(c *gin.Context)
PostUserDeanonymize operation middleware
func (*ServerInterfaceWrapper) PostUserEmailChange ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostUserEmailChange(c *gin.Context)
PostUserEmailChange operation middleware
func (*ServerInterfaceWrapper) PostUserEmailSendVerificationEmail ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostUserEmailSendVerificationEmail(c *gin.Context)
PostUserEmailSendVerificationEmail operation middleware
func (*ServerInterfaceWrapper) PostUserPasswordReset ¶ added in v0.28.0
func (siw *ServerInterfaceWrapper) PostUserPasswordReset(c *gin.Context)
PostUserPasswordReset operation middleware
type Session ¶
type Session struct { AccessToken string `json:"accessToken"` AccessTokenExpiresIn int64 `json:"accessTokenExpiresIn"` // RefreshToken Refresh token during authentication or when refreshing the JWT RefreshToken string `json:"refreshToken"` // RefreshTokenId Refresh token id RefreshTokenId string `json:"refreshTokenId"` User *User `json:"user,omitempty"` }
Session defines model for Session.
type SessionPayload ¶
type SessionPayload struct {
Session *Session `json:"session,omitempty"`
}
SessionPayload defines model for SessionPayload.
type SignInEmailPasswordRequest ¶ added in v0.28.0
type SignInEmailPasswordRequest struct { // Email A valid email Email openapi_types.Email `json:"email"` // Password A password of minimum 3 characters Password string `json:"password"` }
SignInEmailPasswordRequest defines model for SignInEmailPasswordRequest.
type SignInEmailPasswordResponse ¶ added in v0.28.0
type SignInEmailPasswordResponse struct { Mfa *MFAChallengePayload `json:"mfa,omitempty"` Session *Session `json:"session,omitempty"` }
SignInEmailPasswordResponse defines model for SignInEmailPasswordResponse.
type SignInPATRequest ¶ added in v0.28.0
type SignInPATRequest struct { // PersonalAccessToken PAT PersonalAccessToken string `json:"personalAccessToken"` }
SignInPATRequest defines model for SignInPATRequest.
type SignInPasswordlessEmailRequest ¶ added in v0.28.0
type SignInPasswordlessEmailRequest struct { // Email A valid email Email openapi_types.Email `json:"email"` Options *SignUpOptions `json:"options,omitempty"` }
SignInPasswordlessEmailRequest defines model for SignInPasswordlessEmailRequest.
type SignUpEmailPasswordRequest ¶ added in v0.28.0
type SignUpEmailPasswordRequest struct { // Email A valid email Email openapi_types.Email `json:"email"` Options *SignUpOptions `json:"options,omitempty"` // Password A password of minimum 3 characters Password string `json:"password"` }
SignUpEmailPasswordRequest defines model for SignUpEmailPasswordRequest.
type SignUpOptions ¶
type SignUpOptions struct { AllowedRoles *[]string `json:"allowedRoles,omitempty"` DefaultRole *string `json:"defaultRole,omitempty"` DisplayName *string `json:"displayName,omitempty"` // Locale A two-characters locale Locale *string `json:"locale,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` RedirectTo *string `json:"redirectTo,omitempty"` }
SignUpOptions defines model for SignUpOptions.
type SignUpWebauthnRequest ¶ added in v0.28.0
type SignUpWebauthnRequest struct { // Email A valid email Email openapi_types.Email `json:"email"` Options *SignUpOptions `json:"options,omitempty"` }
SignUpWebauthnRequest defines model for SignUpWebauthnRequest.
type SignUpWebauthnResponse ¶ added in v0.28.0
type SignUpWebauthnResponse = protocol.PublicKeyCredentialCreationOptions
SignUpWebauthnResponse defines model for SignUpWebauthnResponse.
type SignUpWebauthnVerifyRequest ¶ added in v0.28.0
type SignUpWebauthnVerifyRequest struct { Credential *protocol.CredentialCreationResponse `json:"credential,omitempty"` Options *struct { AllowedRoles *[]string `json:"allowedRoles,omitempty"` DefaultRole *string `json:"defaultRole,omitempty"` DisplayName *string `json:"displayName,omitempty"` // Locale A two-characters locale Locale *string `json:"locale,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Nickname *string `json:"nickname,omitempty"` RedirectTo *string `json:"redirectTo,omitempty"` } `json:"options,omitempty"` AdditionalProperties map[string]interface{} `json:"-"` }
SignUpWebauthnVerifyRequest defines model for SignUpWebauthnVerifyRequest.
func (SignUpWebauthnVerifyRequest) Get ¶ added in v0.28.0
func (a SignUpWebauthnVerifyRequest) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for SignUpWebauthnVerifyRequest. Returns the specified element and whether it was found
func (SignUpWebauthnVerifyRequest) MarshalJSON ¶ added in v0.28.0
func (a SignUpWebauthnVerifyRequest) MarshalJSON() ([]byte, error)
Override default JSON handling for SignUpWebauthnVerifyRequest to handle AdditionalProperties
func (*SignUpWebauthnVerifyRequest) Set ¶ added in v0.28.0
func (a *SignUpWebauthnVerifyRequest) Set(fieldName string, value interface{})
Setter for additional properties for SignUpWebauthnVerifyRequest
func (*SignUpWebauthnVerifyRequest) UnmarshalJSON ¶ added in v0.28.0
func (a *SignUpWebauthnVerifyRequest) UnmarshalJSON(b []byte) error
Override default JSON handling for SignUpWebauthnVerifyRequest to handle AdditionalProperties
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictgin.StrictGinHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictgin.StrictGinMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface { // Health check // (GET /healthz) GetHealthz(ctx context.Context, request GetHealthzRequestObject) (GetHealthzResponseObject, error) // Health check // (HEAD /healthz) HeadHealthz(ctx context.Context, request HeadHealthzRequestObject) (HeadHealthzResponseObject, error) // Create a Personal Access Token (PAT) // (POST /pat) PostPat(ctx context.Context, request PostPatRequestObject) (PostPatResponseObject, error) // Sign in with email and password // (POST /signin/email-password) PostSigninEmailPassword(ctx context.Context, request PostSigninEmailPasswordRequestObject) (PostSigninEmailPasswordResponseObject, error) // Sign in with magic link sent to user's email. If user doesn't exist, it will be created. The options object is optional and can be used to set the user's when signing up a new user. It is ignored if the user already exists. // (POST /signin/passwordless/email) PostSigninPasswordlessEmail(ctx context.Context, request PostSigninPasswordlessEmailRequestObject) (PostSigninPasswordlessEmailResponseObject, error) // Sign in with Personal Access Token (PAT) // (POST /signin/pat) PostSigninPat(ctx context.Context, request PostSigninPatRequestObject) (PostSigninPatResponseObject, error) // Signup with email and password // (POST /signup/email-password) PostSignupEmailPassword(ctx context.Context, request PostSignupEmailPasswordRequestObject) (PostSignupEmailPasswordResponseObject, error) // Signup with webauthn // (POST /signup/webauthn) PostSignupWebauthn(ctx context.Context, request PostSignupWebauthnRequestObject) (PostSignupWebauthnResponseObject, error) // Verify webauthn signup // (POST /signup/webauthn/verify) PostSignupWebauthnVerify(ctx context.Context, request PostSignupWebauthnVerifyRequestObject) (PostSignupWebauthnVerifyResponseObject, error) // Refresh the JWT access token // (POST /token) PostToken(ctx context.Context, request PostTokenRequestObject) (PostTokenResponseObject, error) // Deanonymize an anonymous user in adding missing email or email+password, depending on the chosen authentication method. Will send a confirmation email if the server is configured to do so // (POST /user/deanonymize) PostUserDeanonymize(ctx context.Context, request PostUserDeanonymizeRequestObject) (PostUserDeanonymizeResponseObject, error) // Change user email // (POST /user/email/change) PostUserEmailChange(ctx context.Context, request PostUserEmailChangeRequestObject) (PostUserEmailChangeResponseObject, error) // Send email verification email // (POST /user/email/send-verification-email) PostUserEmailSendVerificationEmail(ctx context.Context, request PostUserEmailSendVerificationEmailRequestObject) (PostUserEmailSendVerificationEmailResponseObject, error) // Request a password reset. An email with a verification link will be sent to the user's address // (POST /user/password/reset) PostUserPasswordReset(ctx context.Context, request PostUserPasswordResetRequestObject) (PostUserPasswordResetResponseObject, error) // Get version // (GET /version) GetVersion(ctx context.Context, request GetVersionRequestObject) (GetVersionResponseObject, error) }
StrictServerInterface represents all server handlers.
type User ¶
type User struct { AvatarUrl string `json:"avatarUrl"` CreatedAt time.Time `json:"createdAt"` DefaultRole string `json:"defaultRole"` DisplayName string `json:"displayName"` // Email A valid email Email openapi_types.Email `json:"email"` EmailVerified bool `json:"emailVerified"` // Id Id of the user Id string `json:"id"` IsAnonymous bool `json:"isAnonymous"` // Locale A two-characters locale Locale string `json:"locale"` Metadata map[string]interface{} `json:"metadata"` PhoneNumber string `json:"phoneNumber"` PhoneNumberVerified bool `json:"phoneNumberVerified"` Roles []string `json:"roles"` }
User defines model for User.
type UserDeanonymizeRequest ¶ added in v0.28.0
type UserDeanonymizeRequest struct { // Connection Deprecated, will be ignored // Deprecated: Connection *string `json:"connection,omitempty"` // Email A valid email Email openapi_types.Email `json:"email"` Options *SignUpOptions `json:"options,omitempty"` // Password A password of minimum 3 characters Password *string `json:"password,omitempty"` // SignInMethod Which sign-in method to use SignInMethod UserDeanonymizeRequestSignInMethod `json:"signInMethod"` }
UserDeanonymizeRequest defines model for UserDeanonymizeRequest.
type UserDeanonymizeRequestSignInMethod ¶ added in v0.28.0
type UserDeanonymizeRequestSignInMethod string
UserDeanonymizeRequestSignInMethod Which sign-in method to use
const ( EmailPassword UserDeanonymizeRequestSignInMethod = "email-password" Passwordless UserDeanonymizeRequestSignInMethod = "passwordless" )
Defines values for UserDeanonymizeRequestSignInMethod.
type UserEmailChangeRequest ¶ added in v0.28.0
type UserEmailChangeRequest struct { // NewEmail A valid email NewEmail openapi_types.Email `json:"newEmail"` Options *OptionsRedirectTo `json:"options,omitempty"` }
UserEmailChangeRequest defines model for UserEmailChangeRequest.
type UserEmailSendVerificationEmailRequest ¶ added in v0.28.0
type UserEmailSendVerificationEmailRequest struct { // Email A valid email Email openapi_types.Email `json:"email"` Options *OptionsRedirectTo `json:"options,omitempty"` }
UserEmailSendVerificationEmailRequest defines model for UserEmailSendVerificationEmailRequest.
type UserPasswordResetRequest ¶ added in v0.28.0
type UserPasswordResetRequest struct { // Email A valid email Email openapi_types.Email `json:"email"` Options *OptionsRedirectTo `json:"options,omitempty"` }
UserPasswordResetRequest defines model for UserPasswordResetRequest.