view

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespondWithCSS

func RespondWithCSS(w http.ResponseWriter, statusCode int, statusMessage string, data string)

RespondWithCSS writes css response format (for user cover).

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, statusCode int, statusMessage string, data interface{})

RespondWithJSON writes json response format.

Types

type Response added in v0.2.0

type Response struct {
	Status  int         `json:"status"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Response represents response model that will be converted to json.

Jump to

Keyboard shortcuts

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