Documentation ¶
Index ¶
- func CreateDirectoryIfNotExists(path string) error
- func EscapeJsonMultilineStrings(data []byte) []byte
- func FormatBytes(v float32) (string, string)
- func FormatDuration(d timeseries.Duration, limitFirstN int) string
- func FormatDurationShort(d timeseries.Duration, limitFirstN int) string
- func FormatFloat(v float32) string
- func FormatImage(orig string) string
- func FormatLatency(v float32) string
- func FormatLinkStats(requests, latency, bytesSent, bytesReceived float32, issue string) []string
- func FormatMoney(v float32) string
- func FormatPercentage(v float32) string
- func GlobMatch(s string, patterns ...string) bool
- func GlobValidate(patterns []string) bool
- func HumanBits(v float32) string
- func IsIpDocker(ip netaddr.IP) bool
- func IsIpExternal(ip netaddr.IP) bool
- func IsIpPrivate(ip netaddr.IP) bool
- func LastPart(s string, sep string) string
- func NanoId(size int) string
- func ParseHeatmapDuration(s string) time.Duration
- func ParseTime(now timeseries.Time, val string, def timeseries.Time) timeseries.Time
- func RandomString(size int) string
- func ReadJson(r *http.Request, dest any) error
- func WriteJson(w http.ResponseWriter, v any)
- type BasicAuth
- type Header
- type StaticFSWrapper
- type StaticFileInfoWrapper
- type StaticFileWrapper
- type StringSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeJsonMultilineStrings ¶ added in v1.0.0
func FormatBytes ¶
func FormatDuration ¶
func FormatDuration(d timeseries.Duration, limitFirstN int) string
func FormatDurationShort ¶
func FormatDurationShort(d timeseries.Duration, limitFirstN int) string
func FormatFloat ¶
func FormatImage ¶ added in v0.21.0
func FormatLatency ¶
func FormatLinkStats ¶ added in v1.4.0
func FormatMoney ¶
func FormatPercentage ¶
func GlobValidate ¶
func IsIpDocker ¶ added in v1.3.0
func IsIpExternal ¶ added in v1.4.1
func IsIpPrivate ¶ added in v1.3.0
func ParseHeatmapDuration ¶ added in v1.0.0
func ParseTime ¶
func ParseTime(now timeseries.Time, val string, def timeseries.Time) timeseries.Time
func RandomString ¶ added in v1.5.0
func WriteJson ¶
func WriteJson(w http.ResponseWriter, v any)
Types ¶
type StaticFSWrapper ¶ added in v1.5.0
type StaticFSWrapper struct { http.FileSystem // contains filtered or unexported fields }
func NewStaticFSWrapper ¶ added in v1.5.0
func NewStaticFSWrapper(fs fs.FS) *StaticFSWrapper
type StaticFileInfoWrapper ¶ added in v1.5.0
func (*StaticFileInfoWrapper) ModTime ¶ added in v1.5.0
func (f *StaticFileInfoWrapper) ModTime() time.Time
type StaticFileWrapper ¶ added in v1.5.0
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
func NewStringSet ¶
func (*StringSet) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.