model

package
v0.0.0-...-83efb8c Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 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 Book

type Book struct {
	Isbn           string    `json:"isbn"`
	Reviews        []*Review `json:"reviews,omitempty"`
	SimilarBooks   []*Book   `json:"similarBooks"`
	RelatedReviews []*Review `json:"relatedReviews"`
}

func (Book) GetReviews

func (this Book) GetReviews() []*Review

func (Book) IsEntity

func (Book) IsEntity()

func (Book) IsProduct

func (Book) IsProduct()

type Car

type Car struct {
	ID          string  `json:"id"`
	Price       *string `json:"price,omitempty"`
	RetailPrice *string `json:"retailPrice,omitempty"`
}

func (Car) GetRetailPrice

func (this Car) GetRetailPrice() *string

func (Car) IsEntity

func (Car) IsEntity()

func (Car) IsVehicle

func (Car) IsVehicle()

type Error

type Error struct {
	Code    *int    `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

func (Error) IsMetadataOrError

func (Error) IsMetadataOrError()

type Furniture

type Furniture struct {
	Upc     string    `json:"upc"`
	Reviews []*Review `json:"reviews,omitempty"`
}

func (Furniture) GetReviews

func (this Furniture) GetReviews() []*Review

func (Furniture) IsEntity

func (Furniture) IsEntity()

func (Furniture) IsProduct

func (Furniture) IsProduct()

type KeyValue

type KeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func (KeyValue) IsMetadataOrError

func (KeyValue) IsMetadataOrError()

type MetadataOrError

type MetadataOrError interface {
	IsMetadataOrError()
}

type Product

type Product interface {
	IsProduct()
	GetReviews() []*Review
}

type Review

type Review struct {
	ID       string
	Body     *string
	AuthorID string
	Product  Product
	Metadata []MetadataOrError
}

func (Review) IsEntity

func (Review) IsEntity()

type ReviewProduct

type ReviewProduct struct {
	Upc   string `json:"upc"`
	Body  string `json:"body"`
	Stars *int   `json:"stars,omitempty"`
}

type UpdateReviewInput

type UpdateReviewInput struct {
	ID   string  `json:"id"`
	Body *string `json:"body,omitempty"`
}

type User

type User struct {
	ID              string          `json:"id"`
	Username        *string         `json:"username,omitempty"`
	Reviews         []*Review       `json:"reviews,omitempty"`
	NumberOfReviews int             `json:"numberOfReviews"`
	Metadata        []*UserMetadata `json:"metadata,omitempty"`
	GoodAddress     *bool           `json:"goodAddress,omitempty"`
}

func (User) IsEntity

func (User) IsEntity()

type UserMetadata

type UserMetadata struct {
	Address *string `json:"address,omitempty"`
}

type Van

type Van struct {
	ID          string  `json:"id"`
	Price       *string `json:"price,omitempty"`
	RetailPrice *string `json:"retailPrice,omitempty"`
}

func (Van) GetRetailPrice

func (this Van) GetRetailPrice() *string

func (Van) IsEntity

func (Van) IsEntity()

func (Van) IsVehicle

func (Van) IsVehicle()

type Vehicle

type Vehicle interface {
	IsVehicle()
	GetRetailPrice() *string
}

Jump to

Keyboard shortcuts

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