httpsh

package module
v0.0.0-...-b3a9dee Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

README

httpsh

A shell environment, but for HTTP

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Directory   string
	Mime        string
	Methods     []string
	Executables map[string][]string
	Log         *slog.Logger
	// contains filtered or unexported fields
}

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Response

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

type Server

type Server struct {
	Listener     *net.TCPListener
	Handler      *Handler
	TLS          *tls.Config
	ReadTimeout  int
	WriteTimeout int
	IdleTimeout  int
	Key          string
	Certificate  string
	Log          *slog.Logger
}

func (*Server) Run

func (s *Server) Run() error

type Socket

type Socket struct {
	Network string
	Host    string
	Port    string
	Log     *slog.Logger
}

func (*Socket) Listen

func (s *Socket) Listen() (*net.TCPListener, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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