Documentation ¶
Index ¶
- Constants
- type SQLDBRepo
- func (sqdb *SQLDBRepo) ActivateUser(activationToken string, id int64) (*models.User, error)
- func (sqldb *SQLDBRepo) DeleteUser(id int64) error
- func (sqdb *SQLDBRepo) GetFilteredUserRemindersByID(id int64, limit, offset int) ([]*models.Reminder, error)
- func (sqdb *SQLDBRepo) GetUserByEmail(email string) (*models.User, error)
- func (sqdb *SQLDBRepo) GetUserById(id int64) (*models.User, error)
- func (sqdb *SQLDBRepo) GetUserRemindersByID(id int64) ([]*models.Reminder, error)
- func (sqdb *SQLDBRepo) InsertReminder(r *models.Reminder) (*int64, error)
- func (sqdb *SQLDBRepo) InsertUser(u *models.User) (int64, error)
- func (sqdb *SQLDBRepo) NewDatabaseConn() (*sql.DB, error)
- func (sqdb *SQLDBRepo) ProcessAllReminders() ([]models.Reminder, error)
- func (sqdb *SQLDBRepo) ProcessRemindersForUser(id int64) ([]models.Reminder, error)
- func (sqdb *SQLDBRepo) SendNotification(dueDate time.Time, title, content string) error
- func (sqdb *SQLDBRepo) UpdateUser(u *models.User) (int, error)
Constants ¶
View Source
const ( SuperUser int = iota Admin User )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLDBRepo ¶
var (
DBRepo *SQLDBRepo
)
func GetDatabaseConnection ¶
func GetDatabaseConnection() *SQLDBRepo
func NewSQLDBRepo ¶
func (*SQLDBRepo) ActivateUser ¶
func (*SQLDBRepo) DeleteUser ¶
func (*SQLDBRepo) GetFilteredUserRemindersByID ¶
func (*SQLDBRepo) GetUserByEmail ¶
func (*SQLDBRepo) GetUserRemindersByID ¶
func (*SQLDBRepo) InsertReminder ¶
func (*SQLDBRepo) InsertUser ¶
InsertUser accepts a pointer declaration to a user, and inserts it into the database. It will return the User ID, and an error if there are any
func (*SQLDBRepo) ProcessAllReminders ¶
func (*SQLDBRepo) ProcessRemindersForUser ¶
func (*SQLDBRepo) SendNotification ¶
Click to show internal directories.
Click to hide internal directories.