gomiddleware

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 3 Imported by: 1

README

MrAndreID / Go Middleware

Go Reference

The MrAndreID/GoMiddleware package is a collection of functions in the go language.


Table of Contents


Install

To use The MrAndreID/GoMiddleware package, you must follow the steps below:

go get -u github.com/MrAndreID/gomiddleware

Usage

To use The MrAndreID/GoMiddleware package, you must combine it with The gorilla/mux package.

Log
router := mux.NewRouter().StrictSlash(true)

router.Handle("/api/v1/", gomiddleware.Log(Documentation)).Methods("GET")
Acceptable
router := mux.NewRouter().StrictSlash(true)

router.Handle("/api/v1/", gomiddleware.Acceptable(Documentation)).Methods("POST")
Client ID
router := mux.NewRouter().StrictSlash(true)

router.Handle("/api/v1/", gomiddleware.ClientID(Documentation)).Methods("POST")
Timestamp
router := mux.NewRouter().StrictSlash(true)

router.Handle("/api/v1/", gomiddleware.Timestamp(Documentation)).Methods("POST")
App ID
router := mux.NewRouter().StrictSlash(true)

router.Handle("/api/v1/", gomiddleware.AppID(Documentation)).Methods("POST")
Private Key
router := mux.NewRouter().StrictSlash(true)

router.Handle("/api/v1/", gomiddleware.PrivateKey(Documentation)).Methods("POST")
Content Type
router := mux.NewRouter().StrictSlash(true)

router.Handle("/api/v1/", gomiddleware.ContentType(Documentation)).Methods("POST")

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Andrea Adam - MrAndreID

License

MIT licensed. See the LICENSE file for details.

Official Documentation for Go Language

Documentation for Go Language can be found on the Go Language website.

More

Documentation can be found on https://go.dev/.

Documentation

Jump to

Keyboard shortcuts

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