17 lines
538 B
Go
17 lines
538 B
Go
package user
|
|
|
|
import (
|
|
"context"
|
|
"example.com/userService/internal/model"
|
|
)
|
|
|
|
// UserRepository describes the storage operations the business needs.
|
|
// Implementations must atomically enforce unique, normalized email addresses.
|
|
type UserRepository interface {
|
|
Create(context.Context, model.UserInput) (model.User, error)
|
|
Get(context.Context, int64) (model.User, error)
|
|
List(context.Context, int, int) (model.UserPage, error)
|
|
Update(context.Context, int64, model.UserInput) (model.User, error)
|
|
Delete(context.Context, int64) error
|
|
}
|