draincloud-core/internal/storage/interface.go
2024-10-11 00:36:51 +03:00

18 lines
425 B
Go

package storage
import (
"context"
"git.optclblast.xyz/draincloud/draincloud-core/internal/storage/models"
)
type Database interface {
AuthStorage
}
type AuthStorage interface {
AddUser(ctx context.Context, login string, username string, passwordHash []byte) (uint64, error)
GetUserByLogin(ctx context.Context, login string) (*models.User, error)
GetUserByID(ctx context.Context, id uint64) (*models.User, error)
}