controller

package
v0.8.20 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCntrl

type AppCntrl struct {
	dig.In
	Postgres *typpostgres.DB
}

AppCntrl handle API related with application itself

func (*AppCntrl) Health

func (c *AppCntrl) Health(ctx echo.Context) error

Health end point for health check

func (*AppCntrl) Route

func (c *AppCntrl) Route(e *echo.Echo)

Route to define API Route

type BookCntrl

type BookCntrl struct {
	dig.In
	service.BookService
}

BookCntrl is controller to book entity

func (*BookCntrl) Create

func (c *BookCntrl) Create(ec echo.Context) (err error)

Create book

func (*BookCntrl) Delete

func (c *BookCntrl) Delete(ec echo.Context) (err error)

Delete book

func (*BookCntrl) Find

func (c *BookCntrl) Find(ec echo.Context) (err error)

Find books

func (*BookCntrl) FindOne

func (c *BookCntrl) FindOne(ec echo.Context) (err error)

FindOne book

func (*BookCntrl) Route

func (c *BookCntrl) Route(e *echo.Echo)

Route to define API Route

func (*BookCntrl) Update

func (c *BookCntrl) Update(ec echo.Context) (err error)

Update book

type GeneralResponse

type GeneralResponse struct {
	Message string `json:"message"`
}

GeneralResponse is general response

Jump to

Keyboard shortcuts

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