This commit is contained in:
Yovan
2026-10-03 20:28:25 +07:00
parent 14283c2b61
commit 650b24619f
23 changed files with 2373 additions and 30 deletions
+28
View File
@@ -0,0 +1,28 @@
package handler
import (
"context"
"5803025020/w04/internal/models"
)
type UserStore interface {
Create(ctx context.Context, user *models.User) error
GetByUsername(ctx context.Context, username string) (*models.User, error)
}
type SessionStore interface {
Create(ctx context.Context, session *models.Session) error
Delete(ctx context.Context, token string) error
}
type SnippetStore interface {
Create(ctx context.Context, snippet *models.Snippet) error
GetByID(ctx context.Context, id string) (*models.Snippet, error)
GetByUserID(ctx context.Context, userID string) ([]*models.Snippet, error)
Delete(ctx context.Context, id string) error
}