alarms

package
v0.0.0-...-c756ae2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alarm

type Alarm struct {
	ID      int       `pg:"id,pk"`
	UserID  int64     `pg:"user_id"`
	Minutes int       `pg:"minutes"`
	Created time.Time `pg:"created"`

	User *users.User `pg:"rel:has-one"`
	// contains filtered or unexported fields
}

type Svc

type Svc struct {
	// contains filtered or unexported fields
}

func NewSvc

func NewSvc(db *pg.DB) *Svc

func (*Svc) Delete

func (s *Svc) Delete(alarm *Alarm) error

func (*Svc) DeleteByID

func (s *Svc) DeleteByID(id int) error

func (*Svc) GetByID

func (s *Svc) GetByID(id int) (*Alarm, error)

func (*Svc) GetByUserID

func (s *Svc) GetByUserID(userID int64) ([]Alarm, error)

func (*Svc) Persist

func (s *Svc) Persist(alarm *Alarm) error

Jump to

Keyboard shortcuts

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