app

package
v0.0.0-...-c5a0a8d Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 8 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
}

App has router and db instances

func (*App) CreateEmployee

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

func (*App) Delete

func (a *App) Delete(path string, f func(w http.ResponseWriter, r *http.Request))

Wrap the router for DELETE method

func (*App) DeleteEmployee

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

func (*App) DisableEmployee

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

func (*App) EnableEmployee

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

func (*App) Get

func (a *App) Get(path string, f func(w http.ResponseWriter, r *http.Request))

Wrap the router for GET method

func (*App) GetAllEmployees

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

Handlers to manage Employee Data

func (*App) GetEmployee

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

func (*App) Initialize

func (a *App) Initialize(config *config.Config)

App initialize with predefined configuration

func (*App) Post

func (a *App) Post(path string, f func(w http.ResponseWriter, r *http.Request))

Wrap the router for POST method

func (*App) Put

func (a *App) Put(path string, f func(w http.ResponseWriter, r *http.Request))

Wrap the router for PUT method

func (*App) Run

func (a *App) Run(host string)

Run the app on it's router

func (*App) UpdateEmployee

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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