webserv

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTT

func LoadTT(dir string)

func MakeUid

func MakeUid(enable bool)

func RegHandler

func RegHandler(method string, url string, fn HandlerFunc)

func RegJsonRPC

func RegJsonRPC(url string)

func RegMethod

func RegMethod(method string, fn interface{})

func RenderStringTT

func RenderStringTT(ttStr string, vars TmplVars) (string, error)

func RenderTT

func RenderTT(ttName string, vars TmplVars) (string, error)

func SetLogger

func SetLogger(fn LoggerFunc)

func Start

func Start(addr string) error

func WriteStringTT

func WriteStringTT(rw http.ResponseWriter, ttStr string, vars TmplVars)

func WriteTT

func WriteTT(rw http.ResponseWriter, ttName string, vars TmplVars)

Types

type HandlerFunc

type HandlerFunc = handler.Handler

type LoggerFunc

type LoggerFunc = logger.LoggerFunc

type RpcError

type RpcError = jsonrpc2.Error

type TmplVars

type TmplVars = tmpl.VarMap

func VarsTT

func VarsTT() TmplVars

Directories

Path Synopsis
request
url
writers

Jump to

Keyboard shortcuts

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