service

package
v0.0.0-...-be14f60 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCard

func AddCard(data []byte, database database_interface.Database) (*models.Card, error)

AddCard create card with given data and time.now and add it to database and return it.

func ConfirmTheCard

func ConfirmTheCard(id string, database database_interface.Database) error

ConfirmTheCard get card id and increases it by one unit.

func DeleteCard

func DeleteCard(id string, database database_interface.Database) error

DeleteCard get one card and remove it from database.

func RejectTheCard

func RejectTheCard(id string, database database_interface.Database) error

RejectTheCard get card id and set it box to one.

func Review

func Review(database database_interface.Database) ([]models.Card, error)

Review return all card with box==1.

func UpdateCard

func UpdateCard(card models.Card, database database_interface.Database) error

UpdateCard get one card and update it in database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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