controllers

package
v0.0.0-...-f80fa47 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Router *mux.Router
	DB     *gorm.DB
}

func (*App) CreateTask

func (a *App) CreateTask(w http.ResponseWriter, r *http.Request)

CreateTask parses request, validates data and saves the new task

func (*App) DeleteTask

func (a *App) DeleteTask(w http.ResponseWriter, r *http.Request)

func (*App) GetTasks

func (a *App) GetTasks(w http.ResponseWriter, r *http.Request)

func (*App) Initialize

func (a *App) Initialize(DbHost, DbPort, DbUser, DbName, DbPassword string)

Initialize connect to the database and wire up routes

func (*App) RunServer

func (a *App) RunServer()

func (*App) ToggleTaskStatus

func (a *App) ToggleTaskStatus(w http.ResponseWriter, r *http.Request)

func (*App) UserSignUp

func (a *App) UserSignUp(w http.ResponseWriter, r *http.Request)

UserSignUp controller for creating new users

Jump to

Keyboard shortcuts

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