modulepackage
0.0.0-20210802082138-1c5fac9d5069
Repository: https://github.com/mactsouk/rest-api.git
Documentation: pkg.go.dev
# README
rest-api
RESTful server + client
# Packages
No description provided by the author
Package handlers for the RESTful Server
Documentation for REST API
Schemes: http BasePath: / Version: 1.0.7
Consumes: - application/json
Produces: - application/json
swagger:meta.
# Functions
AddHandler is for adding a new user.
No description provided by the author
DeleteHandler is for deleting an existing user + DELETE.
GetAllHandler is for getting all data from the user database.
GetIDHandler returns the ID of an existing user.
GetUserDataHandler + GET returns the full record of a user.
LoggedUsersHandler returns the list of all logged in users.
LoginHandler is for updating the LastLogin time of a user And changing the Active field to true.
LogoutHandler is for logging out a user And changing the Active field to false.
MethodNotAllowedHandler is executed when the HTTP method is incorrect.
SliceToJSON encodes a slice with JSON records.
TimeHandler is for handling /time – it works with plain text.
UpdateHandler is for updating the data of an existing user + PUT.
# Variables
PORT is where the web server listens to.