data

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: BSD-2-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Id        string
	LastName  string
	FirstName string
}

type Book

type Book struct {
	Id         int64
	Name       string
	Authors    []*Author
	Categories []*Category
	Price      float32
	Isbn       string
}

func NewBook

func NewBook(id int64, name string, price float32, isbn string) *Book

func (*Book) AddAuthors

func (book *Book) AddAuthors(authors ...*Author)

func (*Book) AddCategories

func (book *Book) AddCategories(categories ...*Category)

type Category

type Category struct {
	Name string
	Desc string
}

type Shelf

type Shelf struct {
	Id    string
	Name  string
	Books []*Book
}

func NewBookShelf

func NewBookShelf() *Shelf

func NewShelf

func NewShelf(id, name string) *Shelf

func (*Shelf) AddBooks

func (shelf *Shelf) AddBooks(books ...*Book)

Jump to

Keyboard shortcuts

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