repository

package
v0.0.0-...-b779c1c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session interface {
	Create(tokenHash string, userID int64, expiresAt time.Time) (string, error)
	FindByIDWithUsername(sessionID string) (*models.Session, string, error)
	DeleteByID(sessionID string) (string, error)
	UpdateExpiration(sessionID string, newExpiration time.Time) (string, error)
}

NOTE: I am returning sessionId in same function for just check

func NewSessionRepository

func NewSessionRepository(db *sql.DB) Session

type User

type User interface {
	Create(payload *dto.CreateUserPayload) (int64, error)
	CheckEmailAndUsername(email, username string) (emailExists bool, usernameExists bool, err error)
	FindByEmail(email string) (*models.User, error)
}

func NewUser

func NewUser(db *sql.DB) User

Jump to

Keyboard shortcuts

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