http

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Session = session{
	// contains filtered or unexported fields
}

Functions

func FileServer

func FileServer(root http.FileSystem) http.Handler

func GetTime

func GetTime(t time.Time) string

Types

type Download

type Download struct {
}

func (Download) Router

func (down Download) Router(router *mux.Router)

type FileInfo

type FileInfo struct {
	FileName string
	Size     string
	ModTime  string
	IsDir    bool
}

type Host

type Host struct {
}

func (Host) Filter

func (h Host) Filter(r *http.Response, w http.ResponseWriter, data interface{}) bool

func (Host) Handle

func (h Host) Handle(w http.ResponseWriter, r *http.Request)

func (Host) Router

func (h Host) Router(router *mux.Router)

type ListFileInfo

type ListFileInfo struct {
	schema.List
	Items []FileInfo `json:"items"`
}

type Login

type Login struct {
}

func (Login) Login

func (l Login) Login(w http.ResponseWriter, r *http.Request)

func (Login) Router

func (l Login) Router(router *mux.Router)

type Server

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

func NewServer

func NewServer(listen, staticDir, authFile string) (h *Server)

func (*Server) Filter

func (h *Server) Filter(r *http.Request) bool

func (*Server) Handle404

func (h *Server) Handle404(w http.ResponseWriter, r *http.Request)

func (*Server) History added in v0.9.1

func (h *Server) History(user schema.User, r *http.Request)

func (*Server) Initialize

func (h *Server) Initialize()

func (*Server) IsAuth

func (h *Server) IsAuth(w http.ResponseWriter, r *http.Request) bool

func (*Server) LoadRouter

func (h *Server) LoadRouter()

func (*Server) LogRequest

func (h *Server) LogRequest(r *http.Request)

func (*Server) Middleware

func (h *Server) Middleware(next http.Handler) http.Handler

func (*Server) Router

func (h *Server) Router() *mux.Router

func (*Server) SetCert

func (h *Server) SetCert(keyFile, crtFile string)

func (*Server) Shutdown

func (h *Server) Shutdown()

func (*Server) Start

func (h *Server) Start()

type Static

type Static struct {
}

func (Static) Favicon

func (s Static) Favicon(w http.ResponseWriter, r *http.Request)

func (Static) Files

func (s Static) Files(w http.ResponseWriter, r *http.Request)

func (Static) Router

func (s Static) Router(router *mux.Router)

type UI

type UI struct {
}

func (UI) Console

func (ui UI) Console(w http.ResponseWriter, r *http.Request)

func (UI) Hi

func (ui UI) Hi(w http.ResponseWriter, r *http.Request)

func (UI) Home

func (ui UI) Home(w http.ResponseWriter, r *http.Request)

func (UI) Index

func (ui UI) Index(w http.ResponseWriter, r *http.Request)

func (UI) Lite

func (ui UI) Lite(w http.ResponseWriter, r *http.Request)

func (UI) Router

func (ui UI) Router(router *mux.Router)

type WsGraphics

type WsGraphics struct {
}

func (WsGraphics) GetLocal

func (w WsGraphics) GetLocal(id, typ string) string

func (WsGraphics) GetRemote

func (w WsGraphics) GetRemote(id, name, typ string) string

func (WsGraphics) GetTarget

func (w WsGraphics) GetTarget(r *http.Request) string

func (WsGraphics) Handle

func (w WsGraphics) Handle(ws *websocket.Conn)

func (WsGraphics) Router

func (w WsGraphics) Router(router *mux.Router)

type WsProxy

type WsProxy struct {
}

func (WsProxy) Handle

func (w WsProxy) Handle(ws *websocket.Conn)

func (WsProxy) Router

func (w WsProxy) Router(router *mux.Router)

type WsTcp

type WsTcp struct {
}

func (WsTcp) Handle

func (t WsTcp) Handle(ws *websocket.Conn)

func (WsTcp) Local

func (t WsTcp) Local(host string, ws *websocket.Conn)

func (WsTcp) Remote

func (t WsTcp) Remote(host string, ws *websocket.Conn)

func (WsTcp) Router

func (t WsTcp) Router(router *mux.Router)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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