dbModel

package
v0.0.0-...-ee41801 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveBook

func RemoveBook(id int) bool

Types

type Author

type Author struct {
	Firstname string `json:"firstname"`
	Lastname  string `json:"lastname"`
}

Author struct

type Book

type Book struct {
	ID     int     `json:"id"`
	Isbn   string  `json:"isbn"`
	Title  string  `json:"title"`
	Author *Author `json:"author"`
}

Book struct (Model)

func AddBook

func AddBook(book Book) *Book

func GetBook

func GetBook(id int) *Book

func GetBooks

func GetBooks() []*Book

Jump to

Keyboard shortcuts

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