draincloud-core/internal/storage/interface.go

18 lines
426 B
Go
Raw Normal View History

2024-09-27 22:37:58 +00:00
package storage
import (
"context"
"git.optclblast.xyz/draincloud/draincloud-light/internal/storage/models"
)
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)
}