Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider( config *config.Config, deps *Dependencies, ) (*provider, error)
NewProvider returns a new provider for your database type. TODO: change provider struct and NewProvider to use your database client.
This provider must implement all methods from storage.Provider, including: - User, VerificationRequest, Session, Webhook, EmailTemplate, OTP, Authenticator - Memory store methods (when Redis is not configured):
- SessionToken: AddSessionToken, GetSessionTokenByUserIDAndKey, DeleteSessionToken, DeleteSessionTokenByUserIDAndKey, DeleteAllSessionTokensByUserID, DeleteSessionTokensByNamespace, CleanExpiredSessionTokens, GetAllSessionTokens
- MFASession: AddMFASession, GetMFASessionByUserIDAndKey, DeleteMFASession, DeleteMFASessionByUserIDAndKey, GetAllMFASessionsByUserID, CleanExpiredMFASessions, GetAllMFASessions
- OAuthState: AddOAuthState, GetOAuthStateByKey, DeleteOAuthStateByKey, GetAllOAuthStates
Use schemas.Collections for table/collection names (e.g., schemas.Collections.SessionToken).
Types ¶
type Dependencies ¶
Dependencies struct the TODO(replace with new db name) data store provider
Click to show internal directories.
Click to hide internal directories.