Add user management
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"quay/app/models"
|
||||
)
|
||||
|
||||
var ErrUserAlreadyExists = errors.New("user already exists")
|
||||
|
||||
type UserRepository interface {
|
||||
GetAllUsers() ([]models.User, error)
|
||||
GetUserById(id string) (*models.User, error)
|
||||
GetUserByName(name string) (*models.User, error)
|
||||
CreateUser(user *models.User) error
|
||||
UpdateUser(user *models.User) error
|
||||
DeleteUser(id string) error
|
||||
}
|
||||
Reference in New Issue
Block a user