http

package
v0.0.0-...-a773fcb Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

HTTP http error struct

func (*HTTP) BadRequest

func (http *HTTP) BadRequest() *HTTP

BadRequest return http 400 bad request error data

func (*HTTP) Code

func (http *HTTP) Code() int

Code return http error status code

func (*HTTP) Conflict

func (http *HTTP) Conflict() *HTTP

Conflict return http 209 conflict error data

func (*HTTP) Forbidden

func (http *HTTP) Forbidden() *HTTP

Forbidden return http 403 forbidden error data

func (*HTTP) InternalServerError

func (http *HTTP) InternalServerError() *HTTP

InternalServerError return http 500 internal server error data

func (*HTTP) Message

func (http *HTTP) Message() string

Message return http error message

func (*HTTP) NotFound

func (http *HTTP) NotFound() *HTTP

NotFound return http 404 not found error data

func (*HTTP) Unauthorized

func (http *HTTP) Unauthorized() *HTTP

Unauthorized return http 401 unauthorized error data

type Interface

type Interface interface {
	Code() int
	Message() string
	BadRequest() *HTTP
	Unauthorized() *HTTP
	Forbidden() *HTTP
	NotFound() *HTTP
	Conflict() *HTTP
	InternalServerError() *HTTP
}

Interface HTTP error interface

Jump to

Keyboard shortcuts

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