entity

package
v0.0.0-...-60298ba Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	ErrorCode    int
	ErrorMessage string
}

APIError is to record errors

type Item

type Item struct {
	ID           string  `json:id`
	Name         string  `json:"name"`
	Price        float64 `json:"price"`
	Rating       string  `json:"rating"`
	Summary      string  `json:"summary"`
	Manufacturer string  `json:"manufacturer"`
	Sources      Source  `json:"source"`
}

Item is the structure of a general shopping item

type Items

type Items []Item

Items is a list if items

func NewItems

func NewItems() Items

NewItems Return list of Items

type Source

type Source struct {
	Name          string `json:"name"`
	Author        string `json:"author"`
	Title         string `json:"title"`
	Content       string `json:"content"`
	URL           string `json:"url"`
	DatePublished string `json:"date"`
}

Source is the structure of provider of an item

Jump to

Keyboard shortcuts

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