response

package
v0.0.0-...-7674232 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MessageRequestError is default response message for 400 BadRequest error
	MessageRequestError = "Your request is not valid."
	// MessageLockedError is default response message for 423 Locked error
	MessageLockedError = "Specified content is locked and not editable."
	// MessageNotFoundError is default response message for 404 NotFound error
	MessageNotFoundError = "Specified content was not exist."
	// MessageUnauthorizedError is default response message for 401 Unauthorized error
	MessageUnauthorizedError = "Probably your password incorrect."
	// MessageConflictedError is default response message for 409 Conflict error
	MessageConflictedError = "Specified content was already exists."
	// MessagePermissionError is default response message for 403 Forbidden error
	MessagePermissionError = "You don't have enough permission to do it."
	// MessageInternalError is default response message for 500 Internal error
	MessageInternalError = "Unfortunately, the server exploded."
)

Variables

This section is empty.

Functions

func NewConflictedError

func NewConflictedError() gen.ImplResponse

NewConflictedError creates 409 ConflictError response

func NewConflictedErrorWithMessage

func NewConflictedErrorWithMessage(message string) gen.ImplResponse

NewConflictedErrorWithMessage creates 409 ConflictError response with using message

func NewInternalError

func NewInternalError() gen.ImplResponse

NewInternalError creates 500 InternalError response

func NewInternalErrorWithMessage

func NewInternalErrorWithMessage(message string) gen.ImplResponse

NewInternalErrorWithMessage creates 500 InternalError response with using message

func NewLockedError

func NewLockedError() gen.ImplResponse

NewLockedError creates 423 Locked response

func NewLockedErrorWithMessage

func NewLockedErrorWithMessage(message string) gen.ImplResponse

NewLockedErrorWithMessage creates 423 Locked response with using message

func NewNotFoundError

func NewNotFoundError() gen.ImplResponse

NewNotFoundError creates 404 NotFound response

func NewNotFoundErrorWithMessage

func NewNotFoundErrorWithMessage(message string) gen.ImplResponse

NewNotFoundErrorWithMessage creates 404 NotFound response with using message

func NewPermissionError

func NewPermissionError() gen.ImplResponse

NewPermissionError creates 403 Forbidden response

func NewPermissionErrorWithMessage

func NewPermissionErrorWithMessage(message string) gen.ImplResponse

NewPermissionErrorWithMessage creates 403 Forbidden response with using message

func NewRequestError

func NewRequestError() gen.ImplResponse

NewRequestError creates 400 BadRequest response

func NewRequestErrorWithMessage

func NewRequestErrorWithMessage(message string) gen.ImplResponse

NewRequestErrorWithMessage creates 400 BadRequest response with using message

func NewUnauthorizedError

func NewUnauthorizedError() gen.ImplResponse

NewUnauthorizedError creates 401 Unauthorized response

func NewUnauthorizedErrorWithMessage

func NewUnauthorizedErrorWithMessage(message string) gen.ImplResponse

NewUnauthorizedErrorWithMessage creates 401 Unauthorized response with using message

Types

This section is empty.

Jump to

Keyboard shortcuts

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