app

package
v0.0.0-...-52c4e47 Latest Latest
Warning

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

Go to latest
Published: May 17, 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) ArchiveTank

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

func (*App) CompleteFuelPart

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

func (*App) CreateFuelPart

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

func (*App) CreateTank

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

func (*App) Delete

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

Delete wraps the router for DELETE method

func (*App) DeleteFuelPart

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

func (*App) DeleteTank

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

func (*App) Get

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

Get wraps the router for GET method

func (*App) GetAllFuelParts

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

** Fuel Handlers

func (*App) GetAllTanks

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

** Tanks Handlers

func (*App) GetFuelPart

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

func (*App) GetTank

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

func (*App) Initialize

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

Initialize initializes the app with predefined configuration

func (*App) Post

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

Post wraps the router for POST method

func (*App) Put

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

Put wraps the router for PUT method

func (*App) RestoreTank

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

func (*App) Run

func (a *App) Run(host string)

Run the app on it's router

func (*App) UndoFuelPart

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

func (*App) UpdateFuelPart

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

func (*App) UpdateTank

func (a *App) UpdateTank(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