model

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 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 History

type History interface {
	IsHistory()
}

type Product

type Product struct {
	Upc string `json:"upc"`
}

func (Product) IsEntity

func (Product) IsEntity()

type Purchase

type Purchase struct {
	Product *Product `json:"product"`
	Wallet  Wallet   `json:"wallet"`
}

func (Purchase) IsHistory

func (Purchase) IsHistory()

type Sale

type Sale struct {
	Product *Product `json:"product"`
	Rating  int      `json:"rating"`
}

func (Sale) IsHistory

func (Sale) IsHistory()

type User

type User struct {
	ID       string    `json:"id"`
	Username string    `json:"username"`
	History  []History `json:"history"`
}

func (User) IsEntity

func (User) IsEntity()

type Wallet

type Wallet interface {
	IsWallet()
}

type WalletType1

type WalletType1 struct {
	Currency      string  `json:"currency"`
	Amount        float64 `json:"amount"`
	SpecialField1 string  `json:"specialField1"`
}

func (WalletType1) IsWallet

func (WalletType1) IsWallet()

type WalletType2

type WalletType2 struct {
	Currency      string  `json:"currency"`
	Amount        float64 `json:"amount"`
	SpecialField2 string  `json:"specialField2"`
}

func (WalletType2) IsWallet

func (WalletType2) IsWallet()

Jump to

Keyboard shortcuts

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