go-tell/internal/repository/interfaces.go
Daniel Noulet fd2877da9e Add authenticated content editing
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-19 14:56:49 +02:00

25 lines
749 B
Go

package repository
import (
"context"
"github.com/example/cms/internal/domain"
)
type IUserRepository interface {
FindOrCreateByIdentity(context.Context, domain.User) (domain.User, error)
}
type IUserLookup interface {
FindByID(context.Context, uint) (domain.User, error)
}
type IAdminRepository interface {
FindByEmail(context.Context, string) (domain.Admin, error)
}
type ISessionRepository interface {
Create(context.Context, domain.Session) error
FindValid(context.Context, string) (domain.Session, error)
}
type IContentRepository interface {
List(context.Context, int, int) ([]domain.Content, error)
FindBySlug(context.Context, string) (domain.Content, error)
Update(context.Context, domain.Content, domain.ContentHistory) error
}