api

package
v0.0.0-...-24bdf07 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	CloseChannel chan (bool)
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(c *config.Config, logger logrus.FieldLogger, db *db.Database) *API

Initializes and returns a new API structure

func (*API) AddTaskHandler

func (a *API) AddTaskHandler(c *gin.Context)

Inserts a new task into the database

func (*API) ForceClose

func (a *API) ForceClose()

func (*API) GetAllTasksHandler

func (a *API) GetAllTasksHandler(c *gin.Context)

Gets all tasks from the database Query - orderby, limit, offset

func (*API) GetTaskByIDHandler

func (a *API) GetTaskByIDHandler(c *gin.Context)

Gets a task by provided ID

func (*API) Run

func (a *API) Run()

Runs the API router

func (*API) SearchTasksHandler

func (a *API) SearchTasksHandler(c *gin.Context)

Full text search to get tasks Query ?q

func (*API) UpdateDoneHandler

func (a *API) UpdateDoneHandler(c *gin.Context)

Updates the done state of the task with provided id

Jump to

Keyboard shortcuts

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