utils

package
v0.0.0-...-990120d Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSwagger

func LoadSwagger(p string) *openapi3.Swagger

LoadSwagger loads swagger from specified location

func SendResponse

func SendResponse(w http.ResponseWriter, res JSONResponse)

SendResponse handles writing json responses back to the client using http response writer

func StringExists

func StringExists(needle string, haystack []string) bool

StringExists checks for a needle (string) in a haystack (array)

func ToStringMap

func ToStringMap(source []interface{}) []string

ToStringMap converts YAML arrays to their source string array

Types

type JSONResponse

type JSONResponse struct {
	Data        []byte
	Status      int
	ContentType string
}

JSONResponse is alias of map for JSON response

Jump to

Keyboard shortcuts

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