view

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 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{}, meta ...map[string]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"`
	Meta    map[string]interface{} `json:"meta"`
}

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