mirror of https://github.com/fmartingr/bazaar.git
20 lines
329 B
Go
20 lines
329 B
Go
package models
|
|
|
|
import "github.com/fmartingr/bazaar/pkg/clients"
|
|
|
|
type ShopFactory func(baseShop ShopOptions) Shop
|
|
|
|
type Shop interface {
|
|
Get(url string) (*Product, error)
|
|
}
|
|
|
|
type ShopOptions struct {
|
|
Client clients.Client
|
|
}
|
|
|
|
func NewShopOptions(client clients.Client) ShopOptions {
|
|
return ShopOptions{
|
|
Client: client,
|
|
}
|
|
}
|