2023-08-13 13:22:15 +00:00
|
|
|
package storage
|
|
|
|
|
|
|
|
import "context"
|
|
|
|
|
|
|
|
//go:generate mockgen -source=$GOFILE -destination=mocks/$GOFILE -package=mocks
|
|
|
|
|
|
|
|
type User struct {
|
|
|
|
ChatID string
|
|
|
|
UserID string
|
|
|
|
}
|
|
|
|
|
|
|
|
type IStorage interface {
|
|
|
|
UpsertUser(ctx context.Context, user User) error
|
|
|
|
GetAllUsersByChatID(ctx context.Context, chatID string) ([]User, error)
|
2023-08-13 14:06:28 +00:00
|
|
|
Close()
|
2023-08-13 13:22:15 +00:00
|
|
|
}
|