http

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClassIDBase = 1
)

Variables

This section is empty.

Functions

func NewMethodNotAllowedError added in v0.0.5

func NewMethodNotAllowedError(r *http.Request, supportedMethods []string) []byte

NewMethodNotAllowedError generates a error payload for client and shows client's request method with its path, and returns which method this path supported

func NewNewBoardError added in v0.0.5

func NewNewBoardError(r *http.Request) []byte

NewBoardError generates a error payload when create board fail

func NewNoPermissionForCreateBoardArticlesError added in v0.8.0

func NewNoPermissionForCreateBoardArticlesError(r *http.Request, boardID string) []byte

NewNoPermissionForReadBoardArticlesError generates a error payload for telling client they don't have permission to read boardID

func NewNoPermissionForReadBoardArticlesError added in v0.0.5

func NewNoPermissionForReadBoardArticlesError(r *http.Request, boardID string) []byte

NewNoPermissionForReadBoardArticlesError generates a error payload for telling client they don't have permission to read boardID

func NewNoRequiredParameterError added in v0.0.5

func NewNoRequiredParameterError(r *http.Request, requireParameter string) []byte

NewNoRequriedParameterError generates a error payload for telling client which parameter is required

func NewPathNotFoundError added in v0.0.5

func NewPathNotFoundError(r *http.Request) []byte

NewPathNotFoundError generates a path not found payload for client and shows client's request path in argument r.

func NewPermissionError added in v0.0.5

func NewPermissionError(r *http.Request, err error) []byte

NewPermissionError generates a error payload for generic permission error

func NewServerError added in v0.0.5

func NewServerError(r *http.Request, err error) []byte

NewPermissionError generates a error payload for generic server error

func TokenPermissionError added in v0.8.0

func TokenPermissionError(r *http.Request, err error) []byte

TokenPermission generates a error payload for telling client token is not pass

Types

type Delivery

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

TODO: explain what Devlivery do

func NewHTTPDelivery

func NewHTTPDelivery(usecase usecase.Usecase) *Delivery

TODO: explain what this method to

func (*Delivery) Run

func (delivery *Delivery) Run(port int16) error

TODO: explain what this method to

Jump to

Keyboard shortcuts

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