server

package
v0.0.0-...-3b1aa48 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexTemplateString

func IndexTemplateString() string

Returns the html template string for the index page.

func Serve

func Serve(port int) error

Start serving on specified port.

Types

type RequestResponse

type RequestResponse struct {
	// IP address of the remote client
	RemoteAddr string `json:"remoteAddress"`
	// Port of the remote client
	RemotePort string `json:"remotePort"`
	// Host header
	Host string `json:"host"`
	// Request method
	Method string `json:"method"`
	// Request protocol
	Proto string `json:"protocol"`
	// Request headers
	Header http.Header `json:"header"`
}

Contains the data extracted from the request and returned to the user.

func ExtractRequestData

func ExtractRequestData(req *http.Request) *RequestResponse

Jump to

Keyboard shortcuts

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