utils

package
v0.0.0-...-6fd939a Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Email

func Email(name string, email string, subject string, plainContent string, htmlContent string) error

func Fail

func Fail(w http.ResponseWriter, status int, resp map[string]interface{}, message string)

Return fail response

func GetValidationErrorMessage

func GetValidationErrorMessage(err error) string

Build the error message

func Respond

func Respond(w http.ResponseWriter, status int, data interface{})

Return json response

func Success

func Success(w http.ResponseWriter, status int, resp map[string]interface{}, data interface{}, message string)

Return success response

Types

This section is empty.

Jump to

Keyboard shortcuts

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