util

package
v0.0.0-...-c330fda Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package util provides some useful utility functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequestResponse

func BadRequestResponse(w http.ResponseWriter, err interface{})

func CreatedResponse

func CreatedResponse(w http.ResponseWriter, resName string, res interface{})

func ErrorResponse

func ErrorResponse(w http.ResponseWriter, err string)

func LoadEnv

func LoadEnv(verify bool) error

LoadEnv Loads the environment variables defined in the .env file according to the environment running

func NotFoundResponse

func NotFoundResponse(w http.ResponseWriter, resName string)

func OKResponse

func OKResponse(w http.ResponseWriter, resName string, res interface{})

func ParseJSONBody

func ParseJSONBody(r *http.Request) (map[string]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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