controller

package
v0.0.0-...-53677e4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSocketInvalidAuthKey = NewError(
		http.StatusForbidden,
		"To use Websocket interface, a valid Auth Key must be provided")

	ErrSocketAuthFailed = NewError(
		http.StatusForbidden,
		"Authentication has failed with provided Auth Key")

	ErrSocketUnableToGenerateKey = NewError(
		http.StatusInternalServerError,
		"Unable to generate crypto key")

	ErrSocketInvalidDataPackage = NewError(
		http.StatusBadRequest, "Invalid data package")
)

Errors

View Source
var (
	ErrControllerNotImplemented = NewError(
		http.StatusNotImplemented, "Server does not know how to handle the "+
			"request")
)

Error

View Source
var (
	ErrNotFound = NewError(
		http.StatusNotFound, "Page not found")
)

Errors

Functions

func Builder

func Builder(cmds command.Commands) server.HandlerBuilder

Builder returns a http controller builder

Types

type Error

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

Error Controller error

func NewError

func NewError(code int, message string) Error

NewError creates a new Error

func (Error) Code

func (f Error) Code() int

Code return the error code

func (Error) Error

func (f Error) Error() string

Error returns the error message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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