util

package
v0.0.0-...-930013b Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(method, baseUrl, path string, body io.Reader, headers map[string][]string) ([]byte, int, error)

func CheckMapInt

func CheckMapInt(m map[string]interface{}, key string) (int, error)

func CheckMapInt64

func CheckMapInt64(m map[string]interface{}, key string) (int64, error)

func CheckMapString

func CheckMapString(m map[string]interface{}, key string) (string, error)

func CheckMapUInt16

func CheckMapUInt16(m map[string]interface{}, key string) (uint16, error)

func CheckMapUInt32

func CheckMapUInt32(m map[string]interface{}, key string) (uint32, error)

func ContentTypeCheck

func ContentTypeCheck(r *http.Request) error

func GenerateRandomID

func GenerateRandomID() string

GenerateRandomID returns an unique id

func HandleError

func HandleError(resp http.ResponseWriter, respData string, err error, respCode int)

func MatchsContentType

func MatchsContentType(contentType, expectedType string) bool

func NotFoundHandle

func NotFoundHandle(resp http.ResponseWriter, req *http.Request)

func Response

func Response(data []byte, statusCode int, resp http.ResponseWriter)

Types

This section is empty.

Jump to

Keyboard shortcuts

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