system

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package system has some method for manipulate handlers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catch

func Catch(w http.ResponseWriter, r *http.Request)

func WrapCatchHandler

func WrapCatchHandler(fnc http.HandlerFunc) http.HandlerFunc

func WriteError

func WriteError(ctx *RequestCtx, err error) bool

WriteError не уверен, что это должно быть здесь - должен быть какой общий механизм для выдачи такого

Types

type ErrDb

type ErrDb struct {
	Message string
}

Структура для ошибок базы данных

func (ErrDb) Error

func (err ErrDb) Error() string

Функция для обработк структуры ошибок базы данных

type ErrNotLogin

type ErrNotLogin struct {
	Message string
}

func (ErrNotLogin) Error

func (err ErrNotLogin) Error() string

type ErrNotPermission

type ErrNotPermission struct {
	Message string
}

func (ErrNotPermission) Error

func (err ErrNotPermission) Error() string

type FCGI

type FCGI struct {
	Sock string
	Env  func(ctx *RequestCtx) map[string]string
}

FCGI structure for request in PHP-FPM

func NewFPM

func NewFPM(sock string) *FCGI

NewFPM create new FCGI

func NewPHP

func NewPHP(root string, priScript, port, sock string) *FCGI

NewPHP create new FCGI for PHP scripts

func (*FCGI) Do

func (c *FCGI) Do(ctx *RequestCtx) error

Do run request

func (*FCGI) ServeHTTP

func (c *FCGI) ServeHTTP(ctx *RequestCtx) (interface{}, error)

ServeHTTP get request response & render to output

Jump to

Keyboard shortcuts

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