web

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

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

Go to latest
Published: Jun 14, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileServer

func FileServer(r chi.Router, path string, root http.FileSystem)

FileServer conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem.

func Host

func Host(r *http.Request) string

func Request

func Request(uri string) ([]byte, []byte, error)

func RequestHtml

func RequestHtml(uri string) (*goquery.Document, error)

func RequestJson

func RequestJson(uri string, v any) error

func WriteJson

func WriteJson(w http.ResponseWriter, data interface{})

func WriteJsonStatus

func WriteJsonStatus(w http.ResponseWriter, data interface{}, statusCode int)

Types

type Map

type Map map[string]interface{}

Jump to

Keyboard shortcuts

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