sample

package
v0.0.0-...-9b23b2b Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartItem

type CartItem struct {
	Item     Item
	Quantity int32
}

type Item

type Item struct {
	ID        string
	CreatedAt time.Time
	Visible   bool
	OwnerID   int32

	Name        string
	Description *string
	Keywords    []string

	Price  float64
	Weight float32
}

type ShoppingCart

type ShoppingCart map[string]CartItem

func (ShoppingCart) MarshalXML

func (m ShoppingCart) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ShoppingCart) UnmarshalXML

func (m *ShoppingCart) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type User

type User struct {
	Name    string
	Phone   string
	Balance float64

	BirthDay     *time.Time
	RegisteredAt time.Time

	ShoppingCart ShoppingCart

	Blocked bool
}
var Sample User

func (*User) ToUTC

func (u *User) ToUTC()

Jump to

Keyboard shortcuts

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