util

package
v0.0.0-...-75cb93a Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ERROR

func ERROR(w http.ResponseWriter, statusCode int, err error)

ERROR returns a "jsonified" error response along with a status code

func EncodeAuthToken

func EncodeAuthToken(uid uint) (string, error)

EncodeAuthToken creates authentication token

func JSON

func JSON(w http.ResponseWriter, statusCode int, data interface{})

JSON will return a well formatted response with a status code

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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