Peter Kurfer
9ea9a8f658
Some checks failed
Go build / build (push) Failing after 1m58s
- setup ent scheme - add command to create users - document API - add helpers to create migrations - add command to run migrations - add basic compose file
26 lines
562 B
Go
26 lines
562 B
Go
package ports
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/google/uuid"
|
|
|
|
"code.icb4dc0.de/prskr/searcherside/core/cq"
|
|
"code.icb4dc0.de/prskr/searcherside/core/domain"
|
|
)
|
|
|
|
type UserReadRepository interface {
|
|
UserByID(ctx context.Context, id uuid.UUID) (*domain.User, error)
|
|
UserByEmail(ctx context.Context, email string) (*domain.User, error)
|
|
}
|
|
|
|
type UserWriteRepository interface {
|
|
CreateUser(ctx context.Context, user cq.CreateUserRequest) (*cq.CreateUserResponse, error)
|
|
}
|
|
|
|
type UserRepository interface {
|
|
io.Closer
|
|
UserReadRepository
|
|
UserWriteRepository
|
|
}
|