gdhttp

package
v0.0.0-...-7424bbb Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadGet

func ReadGet(r *http.Request) map[interface{}]interface{}

ReadGet ReadGet

func ReadPost

func ReadPost(r *http.Request) []interface{}

ReadPost ReadPost

Types

type Client

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

Client Client

func NewClient

func NewClient() *Client

NewClient NewClient

func (*Client) GET

func (its *Client) GET(url string, chanRPC *chanrpc.Server, f interface{})

GET GET

func (*Client) POST

func (its *Client) POST(url string, values url.Values, chanRPC *chanrpc.Server, f interface{})

POST POST

func (*Client) SyncPost

func (its *Client) SyncPost(url string, values url.Values, fun func(*http.Response))

SyncPost SyncPost

type IRouter

type IRouter interface {
	OnClose()
	Handler() http.Handler
	GET(string, interface{})
	POST(string, interface{})
	Done()
}

IRouter IRouter

type Router

type Router struct {
	*httprouter.Router
	// contains filtered or unexported fields
}

Router Router

func (*Router) Done

func (its *Router) Done()

Done Done

func (*Router) GET

func (its *Router) GET(path string, f interface{})

GET GET

func (*Router) Handler

func (its *Router) Handler() http.Handler

Handler Handler

func (*Router) OnClose

func (its *Router) OnClose()

OnClose OnClose

func (*Router) POST

func (its *Router) POST(path string, f interface{})

POST POST

type Server

type Server struct {
	*http.Server

	Gate        *gate.Gate
	Addr        string
	CertFile    string
	KeyFile     string
	HTTPTimeout time.Duration
	// contains filtered or unexported fields
}

Server Server

func (*Server) Close

func (its *Server) Close()

Close Close

func (*Server) NewRouter

func (its *Server) NewRouter() IRouter

NewRouter NewRouter

func (*Server) Start

func (its *Server) Start()

Start Start

Jump to

Keyboard shortcuts

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