package
Version:
v0.0.0-...-a0c15bd
Opens a new window with list of versions in this module.
Published: Jun 14, 2022
License: GPL-3.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Book struct {
Author Person `json:"author"`
Title string `json:"title"`
Price float64 `json:"price"`
ISBN string `json:"isbn"`
}
type BookStock struct {
Book Book `json:"book"`
Stock int `json:"stock"`
}
type InventoryRepository interface {
SaveBook(book Book) error
ListInventory() ([]Book, error)
}
type Person struct {
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.