api

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler represents handler for every API routes.

func NewHandler

func NewHandler(db *sqlx.DB, auth *auth.Authenticator) (*Handler, error)

NewHandler returns new Handler

func (*Handler) ChangeUserPassword

func (h *Handler) ChangeUserPassword(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

ChangeUserPassword is handler for PUT /api/user/password

func (*Handler) DeleteAccounts

func (h *Handler) DeleteAccounts(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

DeleteAccounts is handler for DELETE /api/accounts

func (*Handler) DeleteEntries

func (h *Handler) DeleteEntries(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

DeleteEntries is handler for DELETE /api/entries

func (*Handler) DeleteUsers

func (h *Handler) DeleteUsers(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

DeleteUsers is handler for DELETE /api/users

func (*Handler) GetChartsData

func (h *Handler) GetChartsData(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

GetChartsData is handler for GET /api/charts

func (*Handler) InsertAccount

func (h *Handler) InsertAccount(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

InsertAccount is handler for POST /api/account

func (*Handler) InsertEntry

func (h *Handler) InsertEntry(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

InsertEntry is handler for POST /api/entry

func (*Handler) InsertUser

func (h *Handler) InsertUser(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

InsertUser is handler for POST /api/user

func (*Handler) Login

func (h *Handler) Login(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Login is handler for POST /api/login

func (*Handler) Logout

func (h *Handler) Logout(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Logout is handler for POST /api/logout

func (*Handler) ResetUserPassword

func (h *Handler) ResetUserPassword(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

ResetUserPassword is handler for PUT /api/user/password/reset

func (*Handler) SelectAccounts

func (h *Handler) SelectAccounts(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

SelectAccounts is handler for GET /api/accounts

func (*Handler) SelectEntries

func (h *Handler) SelectEntries(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

SelectEntries is handler for GET /api/entries

func (*Handler) SelectUsers

func (h *Handler) SelectUsers(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

SelectUsers is handler for GET /api/users

func (*Handler) UpdateAccount

func (h *Handler) UpdateAccount(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

UpdateAccount is handler for PUT /api/account

func (*Handler) UpdateEntry

func (h *Handler) UpdateEntry(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

UpdateEntry is handler for PUT /api/entry

func (*Handler) UpdateUser

func (h *Handler) UpdateUser(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

UpdateUser is handler for PUT /api/user

Jump to

Keyboard shortcuts

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