http

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS          MessageCode = 0
	NOTAUTHORIZED                = 400
	NOAUTHENTICATION             = 401
	NOSERVER                     = 402
	MALFORMEDJSON                = 403
	NOFILE                       = 404
	NOSERVERID                   = 405
	INVALIDTIME                  = 406
	UNKNOWN                      = 999
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Send()

	Code(code int) Builder
	WithCode(code int) Builder

	Message(message string) Builder
	WithMessage(message string) Builder

	Data(data interface{}) Builder
	WithData(data interface{}) Builder

	MessageCode(code MessageCode) Builder
	WithMessageCode(code MessageCode) Builder

	Fail() Builder
	Success() Builder
	WithSuccess(success bool) Builder
}

func Respond

func Respond(c *gin.Context) Builder

type MessageCode

type MessageCode int

Jump to

Keyboard shortcuts

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