Documentation ¶ Index ¶ type Alarm type Svc func NewSvc(db *pg.DB) *Svc func (s *Svc) Delete(alarm *Alarm) error func (s *Svc) DeleteByID(id int) error func (s *Svc) GetByID(id int) (*Alarm, error) func (s *Svc) GetByUserID(userID int64) ([]Alarm, error) func (s *Svc) Persist(alarm *Alarm) error 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 Source Files ¶ View all Source files alarms.go Click to show internal directories. Click to hide internal directories.