spartan

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: BSD-2-Clause Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Success     = 2
	Redirect    = 3
	ClientError = 4
	ServerError = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data added in v0.1.8

type Data struct {
	Length int64
	Data   io.Reader
}

type Response added in v0.1.6

type Response struct {
	URL    *url.URL
	Raw    io.Reader
	Conn   net.Conn
	Status int
	Header string
}

func Request added in v0.1.6

func Request(ctx context.Context, rawURL string, d Data) (*Response, error)

func (*Response) Close added in v0.1.6

func (r *Response) Close()

func (*Response) Read added in v0.1.6

func (r *Response) Read(b []byte) (int, error)

type Space added in v0.1.8

type Space struct {
	Root string
	FS   fs.FS
}

func (*Space) Handle added in v0.1.8

func (c *Space) Handle(request string, w io.Writer) error

Jump to

Keyboard shortcuts

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