Plan stuff. Log stuff.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
593 B

5 years ago
  1. package repositories
  2. import (
  3. "context"
  4. "github.com/gisle/stufflog/models"
  5. )
  6. // UserSessionRepository is a repository for database operations for userSessions.
  7. type UserSessionRepository interface {
  8. FindID(ctx context.Context, id string) (*models.UserSession, error)
  9. List(ctx context.Context) ([]*models.UserSession, error)
  10. ListUser(ctx context.Context, user models.User) ([]*models.UserSession, error)
  11. Save(ctx context.Context, session models.UserSession) error
  12. Remove(ctx context.Context, session models.UserSession) error
  13. RemoveUser(ctx context.Context, user models.User) error
  14. }