Documentation
¶
Index ¶
- func BoolFromForm(r *http.Request, k string) bool
- func ExtractImageUpload(headers *multipart.FileHeader) (upload platform.ImageUpload, err error)
- func ExtractImageUploads(r *http.Request) (uploads []platform.ImageUpload, err error)
- func LoadTemplates() error
- func MakeGet[T any](f handlerFunctionGet[T]) http.HandlerFunc
- func MakePost[T any](f handlerFunctionPost[T]) http.HandlerFunc
- func PostFormValueOrNone(r *http.Request, k string) string
- func RenderOrError(w http.ResponseWriter, template_name string, content interface{})
- func RespondError(w http.ResponseWriter, m string, e error, s int)
- type Content
- type ContentConfig
- type ContentURL
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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
Click to show internal directories.
Click to hide internal directories.