paste

package
v0.0.0-...-77dcaa2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostname

func GetHostname(r *http.Request) string

GetHostname returns the hostname (in the form `http://example.com/`) from a request

Types

type Paste

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

Paste is the wrapper struct for the package

func NewPaste

func NewPaste(manager manager.Manager, mode string, path string) Paste

NewPaste returns a new Paste instance

func (*Paste) HandlePasteUpload

func (p *Paste) HandlePasteUpload(fileData io.Reader, fileName string, w http.ResponseWriter, r *http.Request)

HandlePasteUpload saves the paste to the disc

func (*Paste) RenderPaste

func (p *Paste) RenderPaste(w http.ResponseWriter, r *http.Request)

RenderPaste sends the paste data

func (*Paste) Router

func (p *Paste) Router() chi.Router

Router returns a router for the Paste instance

Jump to

Keyboard shortcuts

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