Documentation
¶
Index ¶
- type Cache
- type GenericProduct
- type GenericSection
- func (g *GenericSection) GetName() string
- func (g *GenericSection) GetParent() string
- func (g *GenericSection) GetPriority(string) int
- func (g *GenericSection) GetReadyTime() time.Time
- func (g *GenericSection) GetStore() *Store
- func (g *GenericSection) GetUrl() string
- func (g *GenericSection) SetReadyTime(readyTime time.Time)
- type Pool
- type Product
- type QuintaY42Product
- type QuintaY42Section
- func (q *QuintaY42Section) GetName() string
- func (q *QuintaY42Section) GetParent() string
- func (q *QuintaY42Section) GetPriority(string) int
- func (q *QuintaY42Section) GetReadyTime() time.Time
- func (q *QuintaY42Section) GetStore() *Store
- func (q *QuintaY42Section) GetUrl() string
- func (q *QuintaY42Section) SetReadyTime(readyTime time.Time)
- type Section
- type Store
- type StoreClient
- type TuEnvioProduct
- type TuEnvioSection
- func (t *TuEnvioSection) GetName() string
- func (t *TuEnvioSection) GetParent() string
- func (t *TuEnvioSection) GetPriority(string) int
- func (t *TuEnvioSection) GetReadyTime() time.Time
- func (t *TuEnvioSection) GetStore() *Store
- func (t *TuEnvioSection) GetUrl() string
- func (t *TuEnvioSection) SetReadyTime(readyTime time.Time)
- type W
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (Cache) AddProduct ¶
type GenericProduct ¶
func (*GenericProduct) GetLink ¶
func (g *GenericProduct) GetLink() string
func (*GenericProduct) GetName ¶
func (g *GenericProduct) GetName() string
func (*GenericProduct) GetPrice ¶
func (g *GenericProduct) GetPrice() string
func (*GenericProduct) GetSection ¶
func (g *GenericProduct) GetSection() Section
type GenericSection ¶
type GenericSection struct {
Name string
Url string
Parent string
Store *Store
Priority int
ReadyTime time.Time
}
func (*GenericSection) GetName ¶
func (g *GenericSection) GetName() string
func (*GenericSection) GetParent ¶
func (g *GenericSection) GetParent() string
func (*GenericSection) GetPriority ¶
func (g *GenericSection) GetPriority(string) int
func (*GenericSection) GetReadyTime ¶
func (g *GenericSection) GetReadyTime() time.Time
func (*GenericSection) GetStore ¶
func (g *GenericSection) GetStore() *Store
func (*GenericSection) GetUrl ¶
func (g *GenericSection) GetUrl() string
func (*GenericSection) SetReadyTime ¶
func (g *GenericSection) SetReadyTime(readyTime time.Time)
type QuintaY42Product ¶
type QuintaY42Product struct {
Name string `css:".product-name" extract:"attr" attr:"title"`
Price string `css:".product-price"`
Link string `css:".product-name" extract:"attr" attr:"href"`
Available string `css:".ajax_add_to_cart_button" extract:"attr" attr:"href"`
Section Section
}
func (*QuintaY42Product) GetLink ¶
func (q *QuintaY42Product) GetLink() string
func (*QuintaY42Product) GetName ¶
func (q *QuintaY42Product) GetName() string
func (*QuintaY42Product) GetPrice ¶
func (q *QuintaY42Product) GetPrice() string
func (*QuintaY42Product) GetSection ¶
func (q *QuintaY42Product) GetSection() Section
type QuintaY42Section ¶
type QuintaY42Section struct {
Name string `css:"a"`
Url string `css:"a" extract:"attr" attr:"href"`
Parent string
Store *Store
Priority int
ReadyTime time.Time
}
func (*QuintaY42Section) GetName ¶
func (q *QuintaY42Section) GetName() string
func (*QuintaY42Section) GetParent ¶
func (q *QuintaY42Section) GetParent() string
func (*QuintaY42Section) GetPriority ¶
func (q *QuintaY42Section) GetPriority(string) int
func (*QuintaY42Section) GetReadyTime ¶
func (q *QuintaY42Section) GetReadyTime() time.Time
func (*QuintaY42Section) GetStore ¶
func (q *QuintaY42Section) GetStore() *Store
func (*QuintaY42Section) GetUrl ¶
func (q *QuintaY42Section) GetUrl() string
func (*QuintaY42Section) SetReadyTime ¶
func (q *QuintaY42Section) SetReadyTime(readyTime time.Time)
type Store ¶
type Store struct {
Id int `json:"id"`
Name string `json:"name"`
// Address string `json:"address"`
Province string `json:"province"`
Online bool `json:"online"`
// PickUpOnStore bool `json:"pickUpOnStore"`
// HomeDelivery bool `json:"homeDelivery"`
// FreezeDelivery string `json:"freezeDelivery"`
// DeliveryTime string `json:"deliveryTime"`
// Cost string `json:"cost"`
Email string `json:"email"`
Phone string `json:"phone"`
Url string `json:"url"`
}
type StoreClient ¶
type StoreClient struct {
// contains filtered or unexported fields
}
func NewStoreClient ¶
func NewStoreClient(redisNetwork, redisAddr string) (*StoreClient, error)
func (*StoreClient) SearchProduct ¶
func (sc *StoreClient) SearchProduct(pattern string) ([]Product, error)
func (*StoreClient) Start ¶
func (sc *StoreClient) Start()
type TuEnvioProduct ¶
type TuEnvioProduct struct {
Name string `css:".thumbTitle",redis:"name"`
Price string `css:".thumbPrice",redis:"price"`
Link string `css:".thumbnail a" extract:"attr" attr:"href",redis:"link"`
Section Section
}
func (*TuEnvioProduct) GetLink ¶
func (t *TuEnvioProduct) GetLink() string
func (*TuEnvioProduct) GetName ¶
func (t *TuEnvioProduct) GetName() string
func (*TuEnvioProduct) GetPrice ¶
func (t *TuEnvioProduct) GetPrice() string
func (*TuEnvioProduct) GetSection ¶
func (t *TuEnvioProduct) GetSection() Section
type TuEnvioSection ¶
type TuEnvioSection struct {
Name string `css:"div ul li a"`
Url string `css:"div ul li a" extract:"attr" attr:"href"`
Parent string
Store *Store
Priority int
ReadyTime time.Time
}
func (*TuEnvioSection) GetName ¶
func (t *TuEnvioSection) GetName() string
func (*TuEnvioSection) GetParent ¶
func (t *TuEnvioSection) GetParent() string
func (*TuEnvioSection) GetPriority ¶
func (t *TuEnvioSection) GetPriority(string) int
func (*TuEnvioSection) GetReadyTime ¶
func (t *TuEnvioSection) GetReadyTime() time.Time
func (*TuEnvioSection) GetStore ¶
func (t *TuEnvioSection) GetStore() *Store
func (*TuEnvioSection) GetUrl ¶
func (t *TuEnvioSection) GetUrl() string
func (*TuEnvioSection) SetReadyTime ¶
func (t *TuEnvioSection) SetReadyTime(readyTime time.Time)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.