service

package
v0.0.0-...-79ec17b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(item models.Item) models.Item

Create a new item and return it with the newly generated id.

func Delete

func Delete(id string) error

Delete an item, returns an error if not found.

func GetAll

func GetAll() []models.Item

GetAll items or return an empty array.

func GetOne

func GetOne(id string) (models.Item, error)

GetOne item by id, returns an error if not found.

func Update

func Update(item models.Item) error

Update an existing item, returns an error if not found.

Types

This section is empty.

Jump to

Keyboard shortcuts

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