playground

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOn

type AddOn struct {
	Name  string
	Price float64
}

type Address

type Address struct {
	Country    string
	City       string
	Street     string
	PostalCode string
}

type Customer

type Customer struct {
	FirstName string
	LastName  string
	Age       int
	Addresses []Address
}

type Discount

type Discount struct {
	Name    string
	Percent int
}

type Env

type Env struct {
	Products  []Product  `expr:"products"`
	Customers []Customer `expr:"customers"`
	Discounts []Discount `expr:"discounts"`
	Orders    []Order    `expr:"orders"`
}

type Feature

type Feature struct {
	Id          string
	Description string
}

type Order

type Order struct {
	Number    int
	Customer  Customer
	Items     []*OrderItem
	Discounts []*Discount
	CreatedAt time.Time
}

type OrderItem

type OrderItem struct {
	Product  Product
	Quantity int
}

type Product

type Product struct {
	Name        string
	Description string
	Price       float64
	Stock       int
	AddOn       *AddOn
	Metadata    map[string]interface{}
	Tags        []string
	Rating      float64
	Reviews     []Review
}

type Review

type Review struct {
	Product  *Product
	Customer *Customer
	Comment  string
	Rating   float64
}

Jump to

Keyboard shortcuts

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