response

package
v0.0.0-...-beb4b11 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_DBERROR                    string = "ERROR_DATABASE_ERROR"
	ERROR_INTERNAL_ERROR             string = "ERROR_INTERNAL_ERROR"
	ERROR_CANT_REGISTER              string = "ERROR_CANT_REGISTER"
	ERROR_NO_ACCESS_TOKEN            string = "ERROR_NO_ACCESS_TOKEN"
	ERROR_NEED_TO_LOGIN              string = "ERROR_NEED_TO_LOGIN"
	ERROR_WRONG_CONTENT_TYPE         string = "ERROR_WRONG_CONTENT_TYPE"
	ERROR_NO_SUCH_USER               string = "ERROR_NO_SUCH_USER"
	ERROR_NOT_ADMIN                  string = "ERROR_NOT_ADMIN"
	ERROR_USER_NOT_CONFIRMED         string = "ERROR_USER_NOT_CONFIRMED"
	ERROR_USER_BLOCKED               string = "ERROR_USER_BLOCKED"
	ERROR_NO_ANSWER_DATA             string = "ERROR_NO_ANSWER_DATA"
	ERROR_EMAIL_FORMAT               string = "ERROR_EMAIL_FORMAT"
	ERROR_EMAIL_EXISTS               string = "ERROR_EMAIL_EXISTS"
	ERROR_SERVER_UNAVAILABLE         string = "ERROR_SERVER_UNAVAILABLE"
	ERROR_REQUEST_DATA               string = "ERROR_REQUEST_DATA"
	ERROR_TOO_BIG_DATA               string = "ERROR_TOO_BIG_DATA"
	ERROR_EMAIL_WASNT_SENT           string = "ERROR_EMAIL_WASNT_SENT"
	ERROR_TOKEN_NOT_FOUND_OR_EXPIRED string = "ERROR_TOKEN_NOT_FOUND_OR_EXPIRED"
	ERROR_NOT_FOUND                  string = "ERROR_NOT_FOUND"
	ERROR_NO_CONTENT                 string = "ERROR_NO_CONTENT"
)

Variables

This section is empty.

Functions

func Error

func Error(err string, rw web.ResponseWriter)

func ErrorBadRequest

func ErrorBadRequest(err string, rw web.ResponseWriter)

func ErrorForbidden

func ErrorForbidden(err string, rw web.ResponseWriter)

func ErrorInternalServer

func ErrorInternalServer(err string, rw web.ResponseWriter)

func ErrorNotAuthorized

func ErrorNotAuthorized(err string, rw web.ResponseWriter)

func Html

func Html(data string, rw web.ResponseWriter)

func Json

func Json(data interface{}, rw web.ResponseWriter)

func JsonIntent

func JsonIntent(data interface{}, rw web.ResponseWriter)

func Plain

func Plain(data []byte, rw web.ResponseWriter)

func String

func String(data string, rw web.ResponseWriter)

func WriteError

func WriteError(err string, rw web.ResponseWriter)

Types

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"Error"`
}

Jump to

Keyboard shortcuts

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