butler/internal/modules/storage/interface.go

17 lines
362 B
Go
Raw Normal View History

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 {
2023-08-13 17:17:42 +00:00
ChatID string `sql:"chat_id"`
UserID string `sql:"user_id"`
2023-08-13 13:22:15 +00:00
}
type IStorage interface {
2023-08-13 17:17:42 +00:00
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
}