service

package
v0.0.0-...-26c603c Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package service contain all business logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCat

func CreateCat(ctx context.Context, cat *model.Cat) (err error)

CreateCat create new cat.

func CreateCategory

func CreateCategory(ctx context.Context, category *model.Category) (err error)

CreateCategory create new category

func DeleteCat

func DeleteCat(ctx context.Context, cat *model.Cat, id string) (err error)

DeleteCat delete cat.

func GetCatByID

func GetCatByID(ctx context.Context, cat *model.Cat, id string) (err error)

GetCatByID fetch cat by ID.

func GetCategories

func GetCategories(ctx context.Context, categories *[]model.Category) (err error)

GetCategories fetch all categories

func GetCats

func GetCats(ctx context.Context, cats *[]model.Cat) (err error)

GetCats fetch all cats.

func UpdateCat

func UpdateCat(ctx context.Context, cat *model.Cat) (err error)

UpdateCat update cat.

Types

This section is empty.

Jump to

Keyboard shortcuts

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