helpers

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

helpers are used by pages/components packages.

Index

Constants

This section is empty.

Variables

View Source
var TimeHourFormat12 string = "12"
View Source
var TimeHourFormat24 string = "24"

Functions

func BytesHumanize added in v0.13.0

func BytesHumanize(bytes int64) string

func Checkbox added in v0.13.0

func Checkbox(r *http.Request, key string) bool

func DecodeForm added in v0.13.0

func DecodeForm(w http.ResponseWriter, r *http.Request, form any) error

func EndpointSchema added in v0.14.0

func EndpointSchema() models.EndpointSchema

func EndpointsSelections added in v0.13.0

func EndpointsSelections(selected []models.Endpoint, all []models.Endpoint) []bool

func JSON added in v0.13.0

func JSON(data any) string

func Pagination added in v0.13.0

func Pagination(q url.Values) (pagination.Page, error)

func ParseMultipartForm added in v0.13.2

func ParseMultipartForm(r *http.Request) error

func Query

func Query(queries url.Values, vals ...any) string

Query merges current URL query with new values.

func Reroute added in v0.14.0

func Reroute(w http.ResponseWriter, r *http.Request, view http.Handler)

func TimeHumanize added in v0.13.0

func TimeHumanize(date time.Time) string

func Tracer added in v0.13.0

func Tracer(app core.App, r *http.Request) trace.Tracer

Types

This section is empty.

Jump to

Keyboard shortcuts

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