15 lines
419 B
Go
15 lines
419 B
Go
package storage
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// Storer defines the interface for database operations.
|
|
type Storer interface {
|
|
FetchAppState(ctx context.Context) (*AppState, error)
|
|
UpdateAppState(ctx context.Context, newState *AppState) error
|
|
AddChatID(ctx context.Context, chatID int64) error
|
|
FetchUserState(ctx context.Context) (*UserState, error)
|
|
UpdateUserState(ctx context.Context, newUserState *UserState) error
|
|
}
|