app

package
v0.0.0-...-d80a93d Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2016 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// GET - For detected HTTP request GET method
	GET = "GET"

	// POST - For detected HTTP request POST method
	POST = "POST"

	// HEAD
	HEAD = "HEAD"

	// PUT
	PUT = "PUT"

	// PATCH
	PATCH = "PATCH"

	// DELETE
	DELETE = "DELETE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

Application

func NewApplication

func NewApplication() *Application

NewApplication creates and initializes new instance of Application

func (*Application) Run

func (this *Application) Run()

Run starts the application

type HandlerInfo

type HandlerInfo struct {
	Name    string
	Method  string
	Route   string
	Handler interface{}
}

Info described routes

type IGetHandler

type IGetHandler interface {
	Process(ctx context.Context, params params.Params) (interface{}, error)
}

IGetHandler defines handlers that process GET-like requests (return some data based on incoming parameters)

type IHttpCodeGetter

type IHttpCodeGetter interface {
	GetHttpCode() int
}

type IPostHandler

type IPostHandler interface {
	Process(ctx context.Context, data interface{}, params params.Params) (interface{}, error)
	GetBuffer() interface{}
}

IPostHandler defines handlers that process POST-like requests (process incoming data using additional parameters)

Jump to

Keyboard shortcuts

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