Documentation
¶
Index ¶
- func NotFound(err error) error
- type Audit
- type AuditEntry
- type Completions
- func (s *Completions) List(ctx context.Context, userID string, from, to *time.Time) ([]*models.TaskCompletion, error)
- func (s *Completions) ListByDue(ctx context.Context, userID string, from, to *time.Time) ([]*models.TaskCompletion, error)
- func (s *Completions) TaskIDs(ctx context.Context, userID string) (map[string]bool, error)
- type Sessions
- func (s *Sessions) Create(ctx context.Context, userID, tokenHash, userAgent string, ttl time.Duration) (*models.Session, error)
- func (s *Sessions) DeleteExpired(ctx context.Context, now time.Time) error
- func (s *Sessions) Expire(ctx context.Context, id string) error
- func (s *Sessions) Lookup(ctx context.Context, tokenHash string) (*models.Session, error)
- type Store
- type Tasks
- func (s *Tasks) Complete(ctx context.Context, userID, id string, now time.Time, ...) (*models.Task, *models.TaskCompletion, bool, error)
- func (s *Tasks) Create(ctx context.Context, t *models.Task) error
- func (s *Tasks) Delete(ctx context.Context, userID, id string) error
- func (s *Tasks) Get(ctx context.Context, userID, id string) (*models.Task, error)
- func (s *Tasks) List(ctx context.Context, userID string, f models.TaskFilter) ([]*models.Task, string, error)
- func (s *Tasks) ListDue(ctx context.Context, now time.Time, maxRows int) ([]*models.Task, error)
- func (s *Tasks) SetLastNotified(ctx context.Context, id string, at time.Time) error
- func (s *Tasks) Update(ctx context.Context, t *models.Task) error
- type Tokens
- func (s *Tokens) Create(ctx context.Context, userID, name, prefix, hash string) (*models.APIToken, error)
- func (s *Tokens) Get(ctx context.Context, userID, id string) (*models.APIToken, error)
- func (s *Tokens) GetByPrefix(ctx context.Context, prefix string) (*models.APIToken, error)
- func (s *Tokens) List(ctx context.Context, userID string) ([]*models.APIToken, error)
- func (s *Tokens) LookupByHash(ctx context.Context, hash string) (*models.APIToken, error)
- func (s *Tokens) Purge(ctx context.Context, id string) error
- func (s *Tokens) Revoke(ctx context.Context, userID, id string) error
- func (s *Tokens) Touch(ctx context.Context, id string) error
- type Users
- func (s *Users) ClearTelegramConfig(ctx context.Context, userID string) error
- func (s *Users) Create(ctx context.Context, u *models.User) error
- func (s *Users) GetByEmail(ctx context.Context, email string) (*models.User, error)
- func (s *Users) GetByID(ctx context.Context, id string) (*models.User, error)
- func (s *Users) GetByTelegramWebhookSecret(_ context.Context, _ string) (*models.User, error)
- func (s *Users) GetTelegramConfig(ctx context.Context, userID string) (encryptedToken, allowedUserIDs string, chatID, chatUserID string, ...)
- func (s *Users) List(ctx context.Context) ([]*models.User, error)
- func (s *Users) ListTelegramEnabled(ctx context.Context) ([]*models.User, error)
- func (s *Users) SetTelegramChatID(ctx context.Context, userID, chatID, chatUserID string) error
- func (s *Users) SetTelegramConfig(ctx context.Context, userID, encryptedToken, allowedUserIDs string) error
- func (s *Users) SoftDelete(ctx context.Context, id string) error
- func (s *Users) Update(ctx context.Context, u *models.User) error
- func (s *Users) UpdatePassword(ctx context.Context, userID, hash string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuditEntry ¶
type Completions ¶
type Completions struct {
// contains filtered or unexported fields
}
func (*Completions) List ¶
func (s *Completions) List(ctx context.Context, userID string, from, to *time.Time) ([]*models.TaskCompletion, error)
func (*Completions) ListByDue ¶
func (s *Completions) ListByDue(ctx context.Context, userID string, from, to *time.Time) ([]*models.TaskCompletion, error)
ListByDue returns completions whose occurrence due_at falls in [from, to], used by the calendar to place each finished occurrence on its own due day regardless of when it was actually completed.
type Sessions ¶
type Sessions struct {
// contains filtered or unexported fields
}
func (*Sessions) DeleteExpired ¶
type Store ¶
type Tasks ¶
type Tasks struct {
// contains filtered or unexported fields
}
func (*Tasks) SetLastNotified ¶
type Tokens ¶
type Tokens struct {
// contains filtered or unexported fields
}
func (*Tokens) GetByPrefix ¶
GetByPrefix looks up an active (non-revoked) token by its public prefix across all users. Used by the admin CLI's `token revoke --prefix`.
func (*Tokens) LookupByHash ¶
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
func (*Users) ClearTelegramConfig ¶
func (*Users) GetByEmail ¶
func (*Users) GetByTelegramWebhookSecret ¶
func (*Users) GetTelegramConfig ¶
func (*Users) ListTelegramEnabled ¶
func (*Users) SetTelegramChatID ¶
func (*Users) SetTelegramConfig ¶
Click to show internal directories.
Click to hide internal directories.