Documentation
¶
Index ¶
- func Capitalize(s string) string
- 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 GetInstanceUuid(dataDir string) 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 Ptr[T any](v T) *T
- func RandomString(size int) string
- func ReadJson(r *http.Request, dest any) error
- func Uniq[T comparable](s []T) []T
- func WriteJson(w http.ResponseWriter, v any)
- type BasicAuth
- type Header
- type StaticFSWrapper
- type StaticFileInfoWrapper
- type StaticFileWrapper
- type StringSet
- func (ss *StringSet) Add(items ...string)
- func (ss *StringSet) Delete(s string)
- func (ss *StringSet) GetFirst() string
- func (ss *StringSet) Has(s string) bool
- func (ss *StringSet) Items() []string
- func (ss *StringSet) Len() int
- func (ss *StringSet) MarshalJSON() ([]byte, error)
- func (ss *StringSet) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capitalize ¶ added in v1.12.0
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 GetInstanceUuid ¶ added in v1.7.0
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 Uniq ¶ added in v1.11.0
func Uniq[T comparable](s []T) []T
func WriteJson ¶
func WriteJson(w http.ResponseWriter, v any)
Types ¶
type BasicAuth ¶
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 ¶
func (*StringSet) UnmarshalJSON ¶ added in v1.14.4
Click to show internal directories.
Click to hide internal directories.