http

package
v0.0.0-...-4036001 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoute

func AddRoute(path string, handler func(req Request) (interface{}, error))

func Start

func Start(port string)

Types

type Request

type Request struct {
	Url       string
	Variables map[string]string
	Post      map[string]interface{}
	ClientIP  string
}

func (*Request) Trusted

func (r *Request) Trusted() bool

type Route

type Route struct {
	Path     []string
	Callback func(req Request) (interface{}, error)
	Method   string
}

type Server

type Server struct {
}

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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