2024-09-27 22:37:58 +00:00
|
|
|
package storage
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2024-10-10 21:36:51 +00:00
|
|
|
"git.optclblast.xyz/draincloud/draincloud-core/internal/storage/models"
|
2024-09-27 22:37:58 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Database interface {
|
|
|
|
AuthStorage
|
|
|
|
}
|
|
|
|
|
|
|
|
type AuthStorage interface {
|
2024-09-30 22:21:37 +00:00
|
|
|
AddUser(ctx context.Context, login string, username string, passwordHash []byte) (uint64, error)
|
2024-09-27 22:37:58 +00:00
|
|
|
GetUserByLogin(ctx context.Context, login string) (*models.User, error)
|
|
|
|
GetUserByID(ctx context.Context, id uint64) (*models.User, error)
|
|
|
|
}
|