{"modulePath":"github.com/OutOfStack/game-library-auth","version":"v1.3.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package openapi\n\nPackage openapi provides primitives to interact with the openapi HTTP API.\n\nCode generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.\n\n## Functions\n\n```go\nfunc RegisterHandlers(router fiber.Router, si ServerInterface)\n```\nRegisterHandlers creates http.Handler with routing matching OpenAPI spec.\n\n```go\nfunc RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)\n```\nRegisterHandlersWithOptions creates http.Handler with additional options\n\n## Types\n\n```go\ntype Error = ErrorResponse\n```\nError defines model for Error.\n\n```go\ntype ErrorResponse = web.ErrResp\n```\nErrorResponse defines model for ErrorResponse.\n\n```go\ntype FiberServerOptions struct {\n\tBaseURL            string\n\tMiddlewares        []MiddlewareFunc\n\tHandlerMiddlewares []HandlerMiddlewareFunc\n}\n```\nFiberServerOptions provides options for the Fiber server.\n\n```go\ntype FieldError = web.FieldError\n```\nFieldError defines model for FieldError.\n\n```go\ntype GitHubOAuthJSONRequestBody = GitHubOAuthRequest\n```\nGitHubOAuthJSONRequestBody defines body for GitHubOAuth for application/json ContentType.\n\n```go\ntype GitHubOAuthRequest struct {\n\t// Code GitHub OAuth authorization code\n\tCode string `json:\"code\" validate:\"required\"`\n}\n```\nGitHubOAuthRequest defines model for GitHubOAuthRequest.\n\n```go\ntype GoogleOAuthJSONRequestBody = GoogleOAuthRequest\n```\nGoogleOAuthJSONRequestBody defines body for GoogleOAuth for application/json ContentType.\n\n```go\ntype GoogleOAuthRequest struct {\n\t// IDToken Google ID token\n\tIDToken string `json:\"idToken\" validate:\"required\"`\n}\n```\nGoogleOAuthRequest defines model for GoogleOAuthRequest.\n\n```go\ntype HandlerMiddlewareFunc func(c fiber.Ctx, next fiber.Handler) error\n```\n\n```go\ntype MiddlewareFunc fiber.Handler\n```\n\n```go\ntype ServerInterface interface {\n\t// DeleteAccount Delete account\n\t// (DELETE /account)\n\tDeleteAccount(c fiber.Ctx) error\n\t// UpdateProfile Update profile\n\t// (PATCH /account)\n\tUpdateProfile(c fiber.Ctx) error\n\t// Logout Logout\n\t// (POST /logout)\n\tLogout(c fiber.Ctx) error\n\t// GitHubOAuth GitHub OAuth sign in\n\t// (POST /oauth/github)\n\tGitHubOAuth(c fiber.Ctx) error\n\t// GoogleOAuth Google OAuth sign in\n\t// (POST /oauth/google)\n\tGoogleOAuth(c fiber.Ctx) error\n\t// RefreshToken Refresh tokens\n\t// (POST /refresh)\n\tRefreshToken(c fiber.Ctx) error\n\t// ResendVerificationEmail Resend verification email\n\t// (POST /resend-verification)\n\tResendVerificationEmail(c fiber.Ctx) error\n\t// SignIn Sign in\n\t// (POST /signin)\n\tSignIn(c fiber.Ctx) error\n\t// SignUp Sign up\n\t// (POST /signup)\n\tSignUp(c fiber.Ctx) error\n\t// Unsubscribe Unsubscribe page\n\t// (GET /unsubscribe)\n\tUnsubscribe(c fiber.Ctx, params UnsubscribeParams) error\n\t// UnsubscribeConfirm Confirm unsubscribe\n\t// (POST /unsubscribe)\n\tUnsubscribeConfirm(c fiber.Ctx) error\n\t// VerifyEmail Verify email\n\t// (POST /verify-email)\n\tVerifyEmail(c fiber.Ctx) error\n}\n```\nServerInterface represents all server handlers.\n\n```go\ntype ServerInterfaceWrapper struct {\n\tHandler            ServerInterface\n\tHandlerMiddlewares []HandlerMiddlewareFunc\n}\n```\nServerInterfaceWrapper converts contexts to parameters.\n\n```go\nfunc (siw *ServerInterfaceWrapper) DeleteAccount(c fiber.Ctx) error\n```\nDeleteAccount operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GitHubOAuth(c fiber.Ctx) error\n```\nGitHubOAuth operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GoogleOAuth(c fiber.Ctx) error\n```\nGoogleOAuth operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) Logout(c fiber.Ctx) error\n```\nLogout operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) RefreshToken(c fiber.Ctx) error\n```\nRefreshToken operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ResendVerificationEmail(c fiber.Ctx) error\n```\nResendVerificationEmail operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) SignIn(c fiber.Ctx) error\n```\nSignIn operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) SignUp(c fiber.Ctx) error\n```\nSignUp operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) Unsubscribe(c fiber.Ctx) error\n```\nUnsubscribe operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) UnsubscribeConfirm(c fiber.Ctx) error\n```\nUnsubscribeConfirm operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) UpdateProfile(c fiber.Ctx) error\n```\nUpdateProfile operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) VerifyEmail(c fiber.Ctx) error\n```\nVerifyEmail operation middleware\n\n```go\ntype SignInJSONRequestBody = SignInReq\n```\nSignInJSONRequestBody defines body for SignIn for application/json ContentType.\n\n```go\ntype SignInReq struct {\n\tPassword string `json:\"password\" validate:\"required,min=8,max=64\"`\n\tUsername string `json:\"username\" validate:\"required,min=4,max=64\"`\n}\n```\nSignInReq defines model for SignInReq.\n\n```go\ntype SignUpJSONRequestBody = SignUpReq\n```\nSignUpJSONRequestBody defines body for SignUp for application/json ContentType.\n\n```go\ntype SignUpReq struct {\n\t// ConfirmPassword must be equal to password\n\tConfirmPassword string `json:\"confirmPassword\" validate:\"eqfield=Password\"`\n\n\t// Email required for publishers\n\tEmail       string `json:\"email,omitempty\" validate:\"omitempty,email\"`\n\tIsPublisher bool   `json:\"isPublisher,omitempty\"`\n\n\t// DisplayName display name\n\tDisplayName string `json:\"name\" validate:\"required\"`\n\tPassword    string `json:\"password\" validate:\"required,min=8,max=64\"`\n\tUsername    string `json:\"username\" validate:\"required,min=4,usernameregex\"`\n}\n```\nSignUpReq defines model for SignUpReq.\n\n```go\ntype Token = TokenResp\n```\nToken defines model for Token.\n\n```go\ntype TokenResp struct {\n\t// AccessToken JWT access token\n\tAccessToken string `json:\"accessToken\"`\n}\n```\nTokenResp defines model for TokenResp.\n\n```go\ntype UnsubscribeConfirmForm struct {\n\t// Token unsubscribe token\n\tToken string `json:\"token\"`\n}\n```\nUnsubscribeConfirmForm defines model for UnsubscribeConfirmForm.\n\n```go\ntype UnsubscribeConfirmFormdataRequestBody = UnsubscribeConfirmForm\n```\nUnsubscribeConfirmFormdataRequestBody defines body for UnsubscribeConfirm for application/x-www-form-urlencoded ContentType.\n\n```go\ntype UnsubscribeParams struct {\n\t// Token unsubscribe token from email link\n\tToken string `form:\"token,omitempty\" json:\"token,omitempty\"`\n}\n```\nUnsubscribeParams defines parameters for Unsubscribe.\n\n```go\ntype UpdateProfileJSONRequestBody = UpdateProfileReq\n```\nUpdateProfileJSONRequestBody defines body for UpdateProfile for application/json ContentType.\n\n```go\ntype UpdateProfileReq struct {\n\t// ConfirmNewPassword must be equal to newPassword\n\tConfirmNewPassword *string `json:\"confirmNewPassword,omitempty\" validate:\"omitempty,min=8,max=64\"`\n\tName               *string `json:\"name,omitempty\"`\n\tNewPassword        *string `json:\"newPassword,omitempty\" validate:\"omitempty,min=8,max=64\"`\n\n\t// Password current password\n\tPassword *string `json:\"password,omitempty\" validate:\"omitempty,min=8,max=64\"`\n}\n```\nUpdateProfileReq password and newPassword must be provided together\n\n```go\ntype VerifyEmailJSONRequestBody = VerifyEmailReq\n```\nVerifyEmailJSONRequestBody defines body for VerifyEmail for application/json ContentType.\n\n```go\ntype VerifyEmailReq struct {\n\t// Code 6-digit verification code\n\tCode string `json:\"code\" validate:\"required,len=6\"`\n}\n```\nVerifyEmailReq defines model for VerifyEmailReq.\n\n","path":"github.com/OutOfStack/game-library-auth/internal/api/openapi","name":"openapi","synopsis":"Package openapi provides primitives to interact with the openapi HTTP API.","isRedistributable":true}
