http

package
v0.0.0-...-cf82ea8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: MIT, MIT Imports: 11 Imported by: 0

Documentation

Overview

Http package allow the user to expose a a Pandora Server as a http server

No authentication is done here. This server considers that the importer of this package, is responsible to implement the authentication and authorization of messages BEFORE calling the handler provided here.

Index

Constants

View Source
const (
	ErrNotFound     = pandora.ApiError("not found")
	ErrPOSTRequired = pandora.ApiError("POST is required")
)

Variables

View Source
var (
	ErrServerPanic = errors.New("bad behavior from the server....")
)

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Server     *pandora.Server
	AllowAdmin bool
}

Handler is the base type used to process http request to a pandora server

func (*Handler) Ack

func (ph *Handler) Ack(req *http.Request) interface{}

func (*Handler) Enqueue

func (ph *Handler) Enqueue(req *http.Request) interface{}

func (*Handler) FetchAndLockLatest

func (ph *Handler) FetchAndLockLatest(req *http.Request) interface{}

func (*Handler) ServeAdmin

func (ph *Handler) ServeAdmin(req *http.Request) interface{}

func (*Handler) ServeHTTP

func (ph *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP processa todas as requisições

Jump to

Keyboard shortcuts

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