Help us shape the future of Go! Take the 2026 Go Developer Survey

web

package module
v0.0.0-...-28514de Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

README

web

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

Application is type of a web.Application

func Create

func Create() *Application

Create return a singleton web.Application

func (*Application) Delete

func (app *Application) Delete(path string, callback Callback)

Delete method

func (*Application) Get

func (app *Application) Get(path string, callback Callback)

Get method

func (*Application) Inspect

func (app *Application) Inspect() string

Inspect method

func (*Application) ListenAndServe

func (app *Application) ListenAndServe(addr string) error

ListenAndServe on addr

func (*Application) ListenAndServeTLS

func (app *Application) ListenAndServeTLS(addr string, tlsConfig *tls.Config) error

ListenAndServeTLS on addr

func (*Application) Log

func (app *Application) Log(line string)

Log method

func (*Application) On

func (app *Application) On(name string, callback Callback)

On add event

func (*Application) Options

func (app *Application) Options(path string, callback Callback)

Options method

func (*Application) Patch

func (app *Application) Patch(path string, callback Callback)

Patch method

func (*Application) Post

func (app *Application) Post(path string, callback Callback)

Post method

func (*Application) Put

func (app *Application) Put(path string, callback Callback)

Put method

func (*Application) Resource

func (app *Application) Resource(path string, callback Callback)

Resource Add the given callback function to this application.middlewares.

func (*Application) ServeHTTP

func (app *Application) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP

func (*Application) Use

func (app *Application) Use(callback Callback)

Use Add the given callback function to this application.middlewares.

type Callback

type Callback func(ctx *Context)

Callback function

type Context

type Context struct {
	Response *Response
	Request  *Request
	Params   *Params
}

Context is type of an web.Context

type Param

type Param struct {
	Key   string
	Value string
}

Param struct

type Params

type Params []Param

Params list

type Request

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

Request is type of a web.Request

type Response

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

Response is type of an web.Response

Jump to

Keyboard shortcuts

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