models

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Product

type Product struct {
	Name        string     `json:"name"`
	Description string     `json:"description"`
	URL         string     `json:"url"`
	ImageURL    string     `json:"image_url"`
	InStock     bool       `json:"in_stock"`
	PriceText   string     `json:"price_text"`
	Price       float64    `json:"price"`
	ReleaseDate *time.Time `json:"release_date"`
}

type Shop

type Shop interface {
	Get(*url.URL) (*Product, error)
}

type ShopFactory

type ShopFactory func(baseShop ShopOptions) Shop

type ShopOptions

type ShopOptions struct {
	Client clients.Client
}

func NewShopOptions

func NewShopOptions(client clients.Client) ShopOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL