evmodels

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIInterface

type APIInterface struct {
	VerifyEmailPOST              *func(token string, sessionContainer sessmodels.SessionContainer, tenantId string, options APIOptions, userContext supertokens.UserContext) (VerifyEmailPOSTResponse, error)
	IsEmailVerifiedGET           *func(sessionContainer sessmodels.SessionContainer, options APIOptions, userContext supertokens.UserContext) (IsEmailVerifiedGETResponse, error)
	GenerateEmailVerifyTokenPOST *func(sessionContainer sessmodels.SessionContainer, options APIOptions, userContext supertokens.UserContext) (GenerateEmailVerifyTokenPOSTResponse, error)
}

type APIOptions

type APIOptions struct {
	RecipeImplementation RecipeInterface
	AppInfo              supertokens.NormalisedAppinfo
	Config               TypeNormalisedInput
	RecipeID             string
	Req                  *http.Request
	Res                  http.ResponseWriter
	OtherHandler         http.HandlerFunc
	EmailDelivery        emaildelivery.Ingredient
	GetEmailForUserID    TypeGetEmailForUserID
}

type CreateEmailVerificationLinkResponse added in v0.13.0

type CreateEmailVerificationLinkResponse struct {
	OK *struct {
		Link string
	}
	EmailAlreadyVerifiedError *struct{}
}

type CreateEmailVerificationTokenResponse

type CreateEmailVerificationTokenResponse struct {
	OK *struct {
		Token string
	}
	EmailAlreadyVerifiedError *struct{}
}

type GenerateEmailVerifyTokenPOSTResponse

type GenerateEmailVerifyTokenPOSTResponse struct {
	OK                        *struct{}
	EmailAlreadyVerifiedError *struct{}
	GeneralError              *supertokens.GeneralErrorResponse
}

type IsEmailVerifiedGETResponse

type IsEmailVerifiedGETResponse struct {
	OK *struct {
		IsVerified bool
	}
	GeneralError *supertokens.GeneralErrorResponse
}

type OverrideStruct

type OverrideStruct struct {
	Functions func(originalImplementation RecipeInterface) RecipeInterface
	APIs      func(originalImplementation APIInterface) APIInterface
}

type RecipeInterface

type RecipeInterface struct {
	CreateEmailVerificationToken  *func(userID, email string, tenantId string, userContext supertokens.UserContext) (CreateEmailVerificationTokenResponse, error)
	VerifyEmailUsingToken         *func(token string, tenantId string, userContext supertokens.UserContext) (VerifyEmailUsingTokenResponse, error)
	IsEmailVerified               *func(userID, email string, userContext supertokens.UserContext) (bool, error)
	RevokeEmailVerificationTokens *func(userId, email string, tenantId string, userContext supertokens.UserContext) (RevokeEmailVerificationTokensResponse, error)
	UnverifyEmail                 *func(userId, email string, userContext supertokens.UserContext) (UnverifyEmailResponse, error)
}

type RevokeEmailVerificationTokensResponse

type RevokeEmailVerificationTokensResponse struct {
	OK *struct{}
}

type SendEmailVerificationLinkResponse added in v0.13.0

type SendEmailVerificationLinkResponse struct {
	OK                        *struct{}
	EmailAlreadyVerifiedError *struct{}
}

type TypeEmailInfo added in v0.9.0

type TypeEmailInfo struct {
	OK *struct {
		Email string
	}
	EmailDoesNotExistError *struct{}
	UnknownUserIDError     *struct{}
}

type TypeGetEmailForUserID added in v0.9.0

type TypeGetEmailForUserID func(userID string, userContext supertokens.UserContext) (TypeEmailInfo, error)

type TypeInput

type TypeInput struct {
	Mode              TypeMode
	GetEmailForUserID TypeGetEmailForUserID
	Override          *OverrideStruct
	EmailDelivery     *emaildelivery.TypeInput
}

type TypeMode added in v0.9.0

type TypeMode string
const (
	ModeRequired TypeMode = "REQUIRED"
	ModeOptional TypeMode = "OPTIONAL"
)

type TypeNormalisedInput

type TypeNormalisedInput struct {
	Mode                   TypeMode
	GetEmailForUserID      TypeGetEmailForUserID
	Override               OverrideStruct
	GetEmailDeliveryConfig func() emaildelivery.TypeInputWithService
}

type UnverifyEmailResponse

type UnverifyEmailResponse struct {
	OK *struct{}
}

type User

type User struct {
	ID    string `json:"id"`
	Email string `json:"email"`
}

type VerifyEmailPOSTResponse added in v0.7.0

type VerifyEmailPOSTResponse struct {
	OK *struct {
		User User
	}
	EmailVerificationInvalidTokenError *struct{}
	GeneralError                       *supertokens.GeneralErrorResponse
}

type VerifyEmailUsingTokenResponse

type VerifyEmailUsingTokenResponse struct {
	OK *struct {
		User User
	}
	EmailVerificationInvalidTokenError *struct{}
}

Jump to

Keyboard shortcuts

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