Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountRepository ¶
type AccountRepository interface { CreateAccount(account *models.Account) (int, error) UpdateAccount(account *models.Account) error GetAccountByProviderAndProviderAccountID(provider string, providerAccountID string) (*models.Account, error) }
func NewAccountRepository ¶
func NewAccountRepository(db *database.DB) AccountRepository
type Repositories ¶
type Repositories struct { User UserRepository Account AccountRepository Session SessionRepository }
func New ¶
func New(db *database.DB) *Repositories
type SessionRepository ¶
type SessionRepository interface { CreateSession(session *models.Session) (int, error) UpdateSessionExpiresAtByToken(token string, expiresAt time.Time) error DeleteSessionByToken(token string) error GetSessionByToken(token string) (*models.Session, error) DeleteExpiredSessions() error }
func NewSessionRepository ¶
func NewSessionRepository(db *database.DB) SessionRepository
type UserRepository ¶
type UserRepository interface { CreateUser(user *models.User) (int, error) UpdateUser(user *models.User) error GetAllUsers() ([]*models.User, error) GetUserByID(id int) (*models.User, error) GetUserByEmail(email string) (*models.User, error) }
func NewUserRepository ¶
func NewUserRepository(db *database.DB) UserRepository
Click to show internal directories.
Click to hide internal directories.