html

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolFromForm

func BoolFromForm(r *http.Request, k string) bool

func ExtractImageUpload

func ExtractImageUpload(headers *multipart.FileHeader) (upload platform.ImageUpload, err error)

func ExtractImageUploads

func ExtractImageUploads(r *http.Request) (uploads []platform.ImageUpload, err error)

func LoadTemplates

func LoadTemplates() error

func MakeGet

func MakeGet[T any](f handlerFunctionGet[T]) http.HandlerFunc

func MakePost

func MakePost[T any](f handlerFunctionPost[T]) http.HandlerFunc

func PostFormValueOrNone

func PostFormValueOrNone(r *http.Request, k string) string

func RenderOrError

func RenderOrError(w http.ResponseWriter, template_name string, content interface{})

func RespondError

func RespondError(w http.ResponseWriter, m string, e error, s int)

Respond with an error that is visible to the user

Types

type Content

type Content[T any] struct {
	C      T
	Config ContentConfig
	URL    ContentURL
}

type ContentConfig

type ContentConfig struct {
	IsProductionEnvironment bool
}

func NewContentConfig

func NewContentConfig() ContentConfig

type ContentURL

type ContentURL struct {
	API                contentURLAPI
	Configuration      contentURLConfiguration
	OAuthRefreshArcGIS string
	RMO                contentURLRMO
	Root               string
	Route              string
	Sidebar            contentURLSidebar
	Tegola             string
	Upload             contentURLUpload
}

func NewContentURL

func NewContentURL() ContentURL

type Response

type Response[T any] struct {
	Content  T
	Template string
}

func NewResponse

func NewResponse[T any](template string, content T) *Response[T]

Jump to

Keyboard shortcuts

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