utils

package
v0.0.0-...-23f2fb9 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterArrayParams

func FilterArrayParams(r *http.Request, b []byte) ([]byte, error)

FilterArrayParams reads a filter array parameter from an HTTP request

func GetIntParam

func GetIntParam(r *http.Request, param string) (int, error)

GetIntParam reads an integer parameter from an HTTP request

func GetStringParam

func GetStringParam(r *http.Request, param string) (string, error)

GetStringParam reads a string parameter from an HTTP request

func GetUUIDParam

func GetUUIDParam(r *http.Request, param string) (string, error)

GetUUIDParam reads a UUID parameter from an HTTP request

func GetUintParam

func GetUintParam(r *http.Request, param string) (uint, error)

GetUintParam reads a uint parameter from an HTTP request

func Message

func Message(status int, message string) map[string]interface{}

Message returns the messages from model to the controller

func ParameterNotExistsErr

func ParameterNotExistsErr(param string) string

ParameterNotExistsErr is a function that returns an error if a parameter does not exist

func ParameterNotUUIDErr

func ParameterNotUUIDErr(param string) string

ParameterNotUUIDErr is a function that returns an error if a parameter is uuid

func Respond

func Respond(w http.ResponseWriter, data map[string]interface{})

Respond returns messages from the controller to the user

Types

This section is empty.

Jump to

Keyboard shortcuts

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