book

package
v0.0.0-...-f1b651b Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteBookHandler

func DeleteBookHandler(c *fiber.Ctx, s Service) error

func GetBookHandler

func GetBookHandler(c *fiber.Ctx, s Service) error

func GetBooksHandler

func GetBooksHandler(c *fiber.Ctx, s Service) error

func NewBookHandler

func NewBookHandler(c *fiber.Ctx, s Service) error

func SetupBookRoutes

func SetupBookRoutes(app *fiber.App, s Service)

Types

type Book

type Book struct {
	ID        uint           `json:"id" gorm:"primarykey"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index"`
	Title     string         `json:"title" gorm:"uniqueIndex:books_title;not null;default:null"`
	AuthorID  uint           `json:"author_id" gorm:"uniqueIndex:books_title;not null;default:null;TYPE:integer REFERENCES users"`
	Rating    int            `json:"rating" gorm:"default=0"`
}

type BookService

type BookService interface {
}

type Service

type Service interface {
	// contains filtered or unexported methods
}

type ServiceStruct

type ServiceStruct struct{}

Jump to

Keyboard shortcuts

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