helpers

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 15 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 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 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