evmodels

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 1 Imported by: 24

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, options APIOptions) (VerifyEmailUsingTokenResponse, error)
	IsEmailVerifiedGET           *func(options APIOptions) (IsEmailVerifiedGETResponse, error)
	GenerateEmailVerifyTokenPOST *func(options APIOptions) (GenerateEmailVerifyTokenPOSTResponse, error)
}

type APIOptions

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

type CreateEmailVerificationTokenResponse

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

type GenerateEmailVerifyTokenPOSTResponse

type GenerateEmailVerifyTokenPOSTResponse struct {
	OK                        *struct{}
	EmailAlreadyVerifiedError *struct{}
}

type IsEmailVerifiedGETResponse

type IsEmailVerifiedGETResponse struct {
	OK *struct {
		IsVerified bool
	}
}

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) (CreateEmailVerificationTokenResponse, error)
	VerifyEmailUsingToken         *func(token string) (VerifyEmailUsingTokenResponse, error)
	IsEmailVerified               *func(userID, email string) (bool, error)
	RevokeEmailVerificationTokens *func(userId, email string) (RevokeEmailVerificationTokensResponse, error)
	UnverifyEmail                 *func(userId, email string) (UnverifyEmailResponse, error)
}

type RevokeEmailVerificationTokensResponse

type RevokeEmailVerificationTokensResponse struct {
	OK *struct{}
}

type TypeInput

type TypeInput struct {
	GetEmailForUserID        func(userID string) (string, error)
	GetEmailVerificationURL  func(user User) (string, error)
	CreateAndSendCustomEmail func(user User, emailVerificationURLWithToken string)
	Override                 *OverrideStruct
}

type TypeNormalisedInput

type TypeNormalisedInput struct {
	GetEmailForUserID        func(userID string) (string, error)
	GetEmailVerificationURL  func(user User) (string, error)
	CreateAndSendCustomEmail func(user User, emailVerificationURLWithToken string)
	Override                 OverrideStruct
}

type UnverifyEmailResponse

type UnverifyEmailResponse struct {
	OK *struct{}
}

type User

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

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