model

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJson

func ToJson(v interface{}) string

Types

type DetailItem

type DetailItem struct {
	Title     string   `json:"title"`
	Images    []string `json:"images"`
	DescImgs  []string `json:"desc_imgs"`
	NumIid    string   `json:"num_iid"`
	DescUrl   string   `json:"desc_url"`
	DetailUrl string   `json:"detail_url"`
	Options   []Option `json:"options"`
}

func (DetailItem) GetDescImgs

func (i DetailItem) GetDescImgs() []string

func (DetailItem) GetDescUrl

func (i DetailItem) GetDescUrl() string

func (DetailItem) GetDetailUrl

func (i DetailItem) GetDetailUrl() string

func (DetailItem) GetImages

func (i DetailItem) GetImages() []string

type Item

type Item struct {
	Id         string
	Title      string
	CategoryId string
	ProductUrl string
	MainImgUrl string
	Price      float64
	Imgs       []string
}

type Model

type Model interface {
	IsSuccess() bool
}

type Option

type Option struct {
	Img   string  `json:"img"`
	Name  string  `json:"name"`
	Price float64 `json:"price"`
	Value string  `json:"value"`
}

type RateLimit

type RateLimit struct {
	Limit    int
	Remain   int
	ResetSec int
}

func FromHeader

func FromHeader(header http.Header) *RateLimit

type SearchResult

type SearchResult struct {
	TotalCount int
	FrameSize  int
	Items      []Item
}

Jump to

Keyboard shortcuts

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