menu

package
v0.0.0-...-9b07b7c Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Menu struct {
	// contains filtered or unexported fields
}

Menu represents menu application service

func Initialize

func Initialize(db *gorm.DB) *Menu

Initialize initalizes menu application service with defaults

func New

func New(db *gorm.DB, udb UDB) *Menu

New creates new menu application service

func (a *Menu) Create(c echo.Context, respMenu *schemago.RespMenu) error

Create create menu

func (a *Menu) Delete(c echo.Context, menuid string) error

Delete provided by menuId

func (a *Menu) Get(c echo.Context, menuid string) (*schemago.RespMenu, error)

Get provided by menuId

func (a *Menu) Query(c echo.Context, reqmenu *schemago.ReqMenu) ([]schemago.RespMenu, int, error)

Query provided by limit page code name ...

func (a *Menu) Update(c echo.Context, respMenu *schemago.RespMenu) error

Update update menu

type Securer

type Securer interface {
	Hash(string) string
}

Securer represents security interface

type Service

Service represents menu application interface

type UDB

type UDB interface {
	Query(*gorm.DB, *schemago.ReqMenu) ([]schemago.RespMenu, int, error)
	Get(*gorm.DB, string) (*schemago.RespMenu, error)
	Create(*gorm.DB, *schemago.RespMenu) error
	Update(*gorm.DB, *schemago.RespMenu) error
	Delete(*gorm.DB, string) error
}

UDB represents menu repository interface

Directories

Path Synopsis
platform

Jump to

Keyboard shortcuts

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