models

package
v0.0.0-...-520ab4c Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteMenu

func DeleteMenu(id string) error

DeleteMenu func to delete Menu

Types

type Menu struct {
	ID          bson.ObjectId `json:"_id,omitempty"           bson:"_id,omitempty"`
	Name        string        `json:"name,omitempty"          bson:"name,omitempty"`
	Description string        `json:"description,omitempty"   bson:"description,omitempty"`
	Price       float64       `json:"price,omitempty"         bson:"price,omitempty"`
	ImageURL    string        `json:"imageUrl,omitempty"      bson:"imageUrl,omitempty"`
}

Menu struct

func GetByID

func GetByID(id string) (Menu, error)

GetByID func get Menu By Id

func NewMenu

func NewMenu(m Menu) (Menu, error)

NewMenu create New Menu

func (m Menu) IsValid() bool

IsValid ...

type Menus []Menu

Menus containing slices of Menu

func All

func All() (Menus, error)

All get All Menus from DB

Jump to

Keyboard shortcuts

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