Version: v0.0.6 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 2 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type APIInterface

type APIInterface struct {
	EmailExistsGET                 func(email string, options APIOptions) (EmailExistsGETResponse, error)
	GeneratePasswordResetTokenPOST func(formFields []TypeFormField, options APIOptions) (GeneratePasswordResetTokenPOSTResponse, error)
	PasswordResetPOST              func(formFields []TypeFormField, token string, options APIOptions) (ResetPasswordUsingTokenResponse, error)
	SignInPOST                     func(formFields []TypeFormField, options APIOptions) (SignInResponse, error)
	SignUpPOST                     func(formFields []TypeFormField, options APIOptions) (SignUpResponse, error)

type APIOptions

type APIOptions struct {
	RecipeImplementation                  RecipeInterface
	EmailVerificationRecipeImplementation evmodels.RecipeInterface
	Config                                TypeNormalisedInput
	RecipeID                              string
	Req                                   *http.Request
	Res                                   http.ResponseWriter
	OtherHandler                          http.HandlerFunc

type CreateResetPasswordTokenResponse

type CreateResetPasswordTokenResponse struct {
	OK *struct {
		Token string
	UnknownUserIdError *struct{}

type EmailExistsGETResponse

type EmailExistsGETResponse struct {
	OK *struct{ Exists bool }

type GeneratePasswordResetTokenPOSTResponse

type GeneratePasswordResetTokenPOSTResponse struct {
	OK *struct{}

type NormalisedFormField

type NormalisedFormField struct {
	ID       string
	Validate func(value interface{}) *string
	Optional bool

type OverrideStruct

type OverrideStruct struct {
	Functions                func(originalImplementation RecipeInterface) RecipeInterface
	APIs                     func(originalImplementation APIInterface) APIInterface
	EmailVerificationFeature *evmodels.OverrideStruct

type RecipeInterface

type RecipeInterface struct {
	SignUp                   func(email string, password string) (SignUpResponse, error)
	SignIn                   func(email string, password string) (SignInResponse, error)
	GetUserByID              func(userID string) (*User, error)
	GetUserByEmail           func(email string) (*User, error)
	CreateResetPasswordToken func(userID string) (CreateResetPasswordTokenResponse, error)
	ResetPasswordUsingToken  func(token string, newPassword string) (ResetPasswordUsingTokenResponse, error)
	UpdateEmailOrPassword    func(userId string, email *string, password *string) (UpdateEmailOrPasswordResponse, error)

type ResetPasswordUsingTokenResponse

type ResetPasswordUsingTokenResponse struct {
	OK                             *struct{}
	ResetPasswordInvalidTokenError *struct{}

type SignInResponse

type SignInResponse struct {
	OK *struct {
		User User
	WrongCredentialsError *struct{}

type SignUpResponse

type SignUpResponse struct {
	OK *struct {
		User User
	EmailAlreadyExistsError *struct{}

type TypeFormField

type TypeFormField struct {
	ID    string `json:"id"`
	Value string `json:"value"`

type TypeInput

type TypeInput struct {
	SignUpFeature                  *TypeInputSignUp
	ResetPasswordUsingTokenFeature *TypeInputResetPasswordUsingTokenFeature
	EmailVerificationFeature       *TypeInputEmailVerificationFeature
	Override                       *OverrideStruct

type TypeInputEmailVerificationFeature

type TypeInputEmailVerificationFeature struct {
	GetEmailVerificationURL  func(user User) (string, error)
	CreateAndSendCustomEmail func(user User, emailVerificationURLWithToken string)

type TypeInputFormField

type TypeInputFormField struct {
	ID       string
	Validate func(value interface{}) *string
	Optional *bool

type TypeInputResetPasswordUsingTokenFeature

type TypeInputResetPasswordUsingTokenFeature struct {
	GetResetPasswordURL      func(user User) (string, error)
	CreateAndSendCustomEmail func(user User, passwordResetURLWithToken string)

type TypeInputSignUp

type TypeInputSignUp struct {
	FormFields []TypeInputFormField

type TypeNormalisedInput

type TypeNormalisedInput struct {
	SignUpFeature                  TypeNormalisedInputSignUp
	SignInFeature                  TypeNormalisedInputSignIn
	ResetPasswordUsingTokenFeature TypeNormalisedInputResetPasswordUsingTokenFeature
	EmailVerificationFeature       evmodels.TypeInput
	Override                       OverrideStruct

type TypeNormalisedInputResetPasswordUsingTokenFeature

type TypeNormalisedInputResetPasswordUsingTokenFeature struct {
	GetResetPasswordURL            func(user User) (string, error)
	CreateAndSendCustomEmail       func(user User, passwordResetURLWithToken string)
	FormFieldsForGenerateTokenForm []NormalisedFormField
	FormFieldsForPasswordResetForm []NormalisedFormField

type TypeNormalisedInputSignIn

type TypeNormalisedInputSignIn struct {
	FormFields []NormalisedFormField

type TypeNormalisedInputSignUp

type TypeNormalisedInputSignUp struct {
	FormFields []NormalisedFormField

type UpdateEmailOrPasswordResponse

type UpdateEmailOrPasswordResponse struct {
	OK                      *struct{}
	UnknownUserIdError      *struct{}
	EmailAlreadyExistsError *struct{}

type User

type User struct {
	ID         string `json:"id"`
	Email      string `json:"email"`
	TimeJoined uint64 `json:"timejoined"`

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL