Documentation
      ¶
    
    
  
    
  
    Overview ¶
Code generated from files in client/src/svg. See https://projectforge.dev for details. DO NOT EDIT.
Index ¶
- Constants
 - Variables
 - func ArrayDereference[T any](x []*T) []T
 - func ArrayFirstN[V any](items []V, n int) []V
 - func ArrayFlatten[T any](arrs ...[]T) []T
 - func ArrayFromAny[T any](dest any) []T
 - func ArrayLastN[V any](items []V, n int) []V
 - func ArrayLimit[T any](x []T, limit int) ([]T, int)
 - func ArrayRemoveDuplicates[T comparable](x []T) []T
 - func ArrayRemoveEmpty[T comparable](x []T) []T
 - func ArrayRemoveNil[T any](x []*T) []*T
 - func ArraySorted[T cmp.Ordered](x []T) []T
 - func ArraySplit[T any](xs []T, fn func(T) bool) ([]T, []T)
 - func ArrayTest(dest any) bool
 - func ArrayToStringArray[T any](a []T) []string
 - func ArrayTransform[T any, U any](x []T, f func(T) U) []U
 - func AsyncCollect[T any, R any](items []T, f func(x T) (R, error), loggers ...Logger) ([]R, []error)
 - func AsyncCollectMap[T any, K comparable, R any](items []T, k func(x T) K, f func(x T) (R, error), loggers ...Logger) (map[K]R, map[K]error)
 - func AsyncRateLimit[T any, R any](key string, items []T, f func(x T) (R, error), maxConcurrent int, ...) ([]R, []error)
 - func ByteSizeIEC(b int64) string
 - func ByteSizeSI(b int64) string
 - func Choose[T any](b bool, ifTrue T, ifFalse T) T
 - func ConfigureAcronym(key, val string)
 - func CountryFlag(code string) string
 - func CycleJSON(src any, tgt any) error
 - func CycleXML(src any, tgt any) error
 - func DebugBuildInfo() *debug.BuildInfo
 - func DebugMemStats() *runtime.MemStats
 - func DebugStartCPUProfile() error
 - func DebugTakeHeapProfile() error
 - func DecryptMessage(key []byte, message string, logger Logger) (string, error)
 - func DefaultIfNil[T any](ptr *T, d T) T
 - func DefaultValue[T any]() T
 - func EncryptMessage(key []byte, message string, logger Logger) (string, error)
 - func ErrorMerge(errs ...error) error
 - func Filename(s string) string
 - func FormatSeconds(x float64) string
 - func FormatSecondsFull(x float64) string
 - func FromJSON(msg json.RawMessage, tgt any) error
 - func FromJSONAny(msg json.RawMessage) (any, error)
 - func FromJSONAnyOK(msg json.RawMessage) any
 - func FromJSONObj[T any](msg json.RawMessage) (T, error)
 - func FromJSONReader(r io.Reader, tgt any) error
 - func FromJSONStrict(msg json.RawMessage, tgt any) error
 - func FromJSONString(msg json.RawMessage) (string, error)
 - func FromTOML(msg []byte, tgt any) error
 - func FromTOMLAny(msg []byte) (any, error)
 - func FromTOMLReader(r io.Reader, tgt any) error
 - func FromTOMLStrict(msg []byte, tgt any) error
 - func FromTOMLString(msg []byte) (string, error)
 - func FromXML(msg []byte, tgt any) error
 - func FromXMLAny(msg []byte) (any, error)
 - func FromXMLReader(r io.Reader, tgt any) error
 - func FromXMLStrict(msg []byte, tgt any) error
 - func FromXMLString(msg []byte) (string, error)
 - func GetEnv(name string, defaultValue ...string) string
 - func GetEnvBool(name string, defaultValue bool) bool
 - func GetEnvDuration(name string, defaultValue time.Duration) time.Duration
 - func GetEnvInt(name string, defaultValue int) int
 - func HashFNV128UUID(s string) uuid.UUID
 - func HashFNV32(s string) uint32
 - func HashSHA256(s string) string
 - func InitAcronyms(extras ...string) error
 - func JSONToMap(i any) map[string]any
 - func JoinLines(ss []string, delim string, maxLen int) []string
 - func JoinLinesFull(ss []string, delim string, maxLen int, prefix string, indent string, ...) string
 - func LengthAny(dest any) int
 - func MapError[T any, U any](xa []T, f func(el T, idx int) (U, error)) ([]U, error)
 - func MapGetOrElse[K comparable, V any](mp map[K]V, k K, dflt V) V
 - func MarkdownTable(header []string, rows [][]string, linebreak string) (string, error)
 - func MarkdownTableParse(md string) ([]string, [][]string)
 - func MicrosToMillis(i int) string
 - func OrDefault[T comparable](x T, dflt T) T
 - func ParseArray(r any, path string, allowEmpty bool, coerce bool) ([]any, error)
 - func ParseArrayFloat(r any, path string, allowEmpty bool) ([]float64, error)
 - func ParseArrayInt(r any, path string, allowEmpty bool) ([]int, error)
 - func ParseArrayString(r any, path string, allowEmpty bool) ([]string, error)
 - func ParseBool(r any, path string, allowEmpty bool) (bool, error)
 - func ParseFloat(r any, path string, allowEmpty bool) (float64, error)
 - func ParseInt(r any, path string, allowEmpty bool) (int, error)
 - func ParseInt64(r any, path string, allowEmpty bool) (int64, error)
 - func ParseJSON(r any, path string, allowEmpty bool) (any, error)
 - func ParseString(r any, path string, allowEmpty bool) (string, error)
 - func ParseTime(r any, path string, allowEmpty bool) (*time.Time, error)
 - func ParseUUID(r any, path string, allowEmpty bool) (*uuid.UUID, error)
 - func RandomBool() bool
 - func RandomBytes(size int) []byte
 - func RandomDate() time.Time
 - func RandomElement[T any](slice []T) T
 - func RandomElements[T any](slice []T, idx int) []T
 - func RandomFloat(maxExclusive int) float64
 - func RandomIcon() string
 - func RandomInt(maxExclusive int) int
 - func RandomInt64(maxExclusive int64) int64
 - func RandomString(length int) string
 - func RandomURL() *url.URL
 - func ReplaceEnvVars(s string, logger Logger) string
 - func RunProcess(cmd string, path string, in io.Reader, out io.Writer, er io.Writer, ...) (int, error)
 - func RunProcessSimple(cmd string, path string) (int, string, error)
 - func StartProcess(cmd string, path string, in io.Reader, out io.Writer, er io.Writer, ...) (*exec.Cmd, error)
 - func StringArrayFromAny(a []any, maxLength int) []string
 - func StringArrayMaxLength(a []string) int
 - func StringArrayOxfordComma(names []string, separator string) string
 - func StringArrayQuoted(a []string) []string
 - func StringDetectLinebreak(s string) string
 - func StringForms(s string) (string, string)
 - func StringNullable(s fmt.Stringer) string
 - func StringPad(s string, size int) string
 - func StringPadLeft(s string, size int, chr rune) string
 - func StringPadRight(s string, size int, chr rune) string
 - func StringPlural(count int, s string) string
 - func StringRepeat(s string, n int) string
 - func StringReplaceBetween(s string, l string, r string, replacement string) (string, error)
 - func StringSplit(s string, sep byte, cutc bool) (string, string)
 - func StringSplitAndTrim(s string, delim string) []string
 - func StringSplitLast(s string, sep byte, cutc bool) (string, string)
 - func StringSplitLastOnly(s string, sep byte, cutc bool) string
 - func StringSplitLines(s string) []string
 - func StringSplitLinesIndented(s string, indent int, indentFirstLine bool, includeEmptyLines bool) []string
 - func StringSplitPath(s string) (string, string)
 - func StringSplitPathAndTrim(s string) []string
 - func StringSubstringBetween(s string, l string, r string) string
 - func StringToCamel(s string, extraAcronyms ...string) string
 - func StringToLowerCamel(s string, extraAcronyms ...string) string
 - func StringToPlural(s string) string
 - func StringToSingular(s string) string
 - func StringToSnake(s string, extraAcronyms ...string) string
 - func StringToTitle(s string, extraAcronyms ...string) string
 - func StringTruncate(s string, mx int) string
 - func TimeCurrent() time.Time
 - func TimeCurrentMillis() int64
 - func TimeCurrentNanos() int64
 - func TimeCurrentP() *time.Time
 - func TimeCurrentUnix() int64
 - func TimeFromFull(s string) (*time.Time, error)
 - func TimeFromFullMS(s string) (*time.Time, error)
 - func TimeFromHTML(s string) (*time.Time, error)
 - func TimeFromJS(s string) (*time.Time, error)
 - func TimeFromRFC3339(s string) (*time.Time, error)
 - func TimeFromString(s string) (*time.Time, error)
 - func TimeFromStringFmt(s string, fmt string) (*time.Time, error)
 - func TimeFromStringSimple(s string) *time.Time
 - func TimeFromVerbose(s string) (*time.Time, error)
 - func TimeFromYMD(s string) (*time.Time, error)
 - func TimeMax(ts ...*time.Time) *time.Time
 - func TimeMin(ts ...*time.Time) *time.Time
 - func TimeRelative(t *time.Time) string
 - func TimeToFull(d *time.Time) string
 - func TimeToFullMS(d *time.Time) string
 - func TimeToHTML(d *time.Time) string
 - func TimeToHours(d *time.Time) string
 - func TimeToJS(d *time.Time) string
 - func TimeToJSFull(d *time.Time) string
 - func TimeToMap(t time.Time) map[string]any
 - func TimeToRFC3339(d *time.Time) string
 - func TimeToString(d *time.Time, fmt string) string
 - func TimeToVerbose(d *time.Time) string
 - func TimeToYMD(d *time.Time) string
 - func TimeToday() *time.Time
 - func TimeTruncate(t *time.Time) *time.Time
 - func ToCSV(data any) ([]string, [][]string, error)
 - func ToCSVBytes(data any) ([]byte, error)
 - func ToJSON(x any) string
 - func ToJSONBytes(x any, indent bool) []byte
 - func ToJSONCompact(x any) string
 - func ToTOML(x any) string
 - func ToTOMLBytes(x any) []byte
 - func ToXML(x any) (string, error)
 - func ToXMLBytes(x any, indent bool) ([]byte, error)
 - func ToXMLCompact(x any) (string, error)
 - func UUID() uuid.UUID
 - func UUIDFromString(s string) *uuid.UUID
 - func UUIDFromStringOK(s string) uuid.UUID
 - func UUIDP() *uuid.UUID
 - func UUIDString(u *uuid.UUID) string
 - func UUIDV7() uuid.UUID
 - func UUIDV7P() *uuid.UUID
 - func ValueMapGet[T any](m ValueMap, pth string) (T, error)
 - type DebugInfo
 - type Diff
 - type Diffs
 - type DiffsSet
 - type ErrorDetail
 - type ErrorFrame
 - type FieldDesc
 - type FieldDescResults
 - type FieldDescs
 - type HTTPRequest
 - type KeyTypeDesc
 - type KeyTypeDescs
 - type KeyVal
 - type KeyVals
 - type Logger
 - type NilBool
 - type NilFloat64
 - type NilInt32
 - type NilInt64
 - type NilJSON
 - type NilString
 - type NilTime
 - type Node
 - type Nodes
 - type OrderedMap
 - func (o *OrderedMap[V]) Append(k string, v V)
 - func (o *OrderedMap[V]) Clone() *OrderedMap[V]
 - func (o *OrderedMap[V]) Get(k string) (V, bool)
 - func (o *OrderedMap[V]) GetSimple(k string) V
 - func (o *OrderedMap[V]) HasKey(k string) bool
 - func (o *OrderedMap[V]) IndexOf(k string) int
 - func (o OrderedMap[V]) MarshalJSON() ([]byte, error)
 - func (o OrderedMap[V]) MarshalXML(e *xml.Encoder, start xml.StartElement) error
 - func (o OrderedMap[V]) MarshalYAML() (any, error)
 - func (o *OrderedMap[V]) Pairs() []*OrderedPair[V]
 - func (o *OrderedMap[V]) Remove(k string)
 - func (o *OrderedMap[V]) Set(k string, v V)
 - func (o *OrderedMap[V]) UnmarshalJSON(b []byte) error
 
- type OrderedPair
 - type Pkg
 - func (p Pkg) Drop(n int) Pkg
 - func (p Pkg) Equals(other Pkg) bool
 - func (p Pkg) Last() string
 - func (p Pkg) Push(name string) Pkg
 - func (p Pkg) Quoted(quote string) string
 - func (p Pkg) Shift() Pkg
 - func (p Pkg) StartsWith(t Pkg) bool
 - func (p Pkg) String() string
 - func (p Pkg) StringWith(extra ...string) string
 - func (p Pkg) ToPath(extra ...string) string
 - func (p Pkg) Trim(src Pkg) Pkg
 - func (p Pkg) With(key string) Pkg
 
- type Progress
 - type Set
 - func (s *Set[T]) Clone() *Set[T]
 - func (s *Set[T]) Contains(x T) bool
 - func (s *Set[T]) Entries() []T
 - func (s Set[T]) MarshalJSON() ([]byte, error)
 - func (s Set[T]) MarshalXML(e *xml.Encoder, start xml.StartElement) error
 - func (s Set[T]) MarshalYAML() (any, error)
 - func (s *Set[T]) Remove(x T)
 - func (s *Set[T]) Set(v T)
 - func (s *Set[T]) UnmarshalJSON(b []byte) error
 
- type StringSlice
 - type Timer
 - type Tree
 - type ValueMap
 - func FromJSONMap(msg json.RawMessage) (ValueMap, error)
 - func FromTOMLMap(msg []byte) (ValueMap, error)
 - func FromXMLMap(msg []byte) (ValueMap, error)
 - func ParseArrayMap(r any, path string, allowEmpty bool) ([]ValueMap, error)
 - func ParseMap(r any, path string, allowEmpty bool) (ValueMap, error)
 - func RandomValueMap(keys int) ValueMap
 - func ValueMapFor(kvs ...any) ValueMap
 - func ValueMapFrom(m map[string]any) ValueMap
 
- func (m ValueMap) Add(kvs ...any)
 - func (m ValueMap) AsChanges() (ValueMap, error)
 - func (m ValueMap) AsMap(simplify bool) map[string]any
 - func (m ValueMap) Clone() ValueMap
 - func (m ValueMap) Filter(keys []string) ValueMap
 - func (m ValueMap) GetArray(key string, allowEmpty bool) ([]any, error)
 - func (m ValueMap) GetArrayOpt(key string) []any
 - func (m ValueMap) GetBool(key string, allowEmpty bool) (bool, error)
 - func (m ValueMap) GetBoolOpt(key string) bool
 - func (m ValueMap) GetFloat(key string, allowEmpty bool) (float64, error)
 - func (m ValueMap) GetFloatArray(key string, allowEmpty bool) ([]float64, error)
 - func (m ValueMap) GetFloatOpt(key string) float64
 - func (m ValueMap) GetInt(key string, allowEmpty bool) (int, error)
 - func (m ValueMap) GetInt64(key string, allowEmpty bool) (int64, error)
 - func (m ValueMap) GetIntArray(key string, allowEmpty bool) ([]int, error)
 - func (m ValueMap) GetIntOpt(key string) int
 - func (m ValueMap) GetMap(key string, allowEmpty bool) (ValueMap, error)
 - func (m ValueMap) GetMapArray(key string, allowEmpty bool) ([]ValueMap, error)
 - func (m ValueMap) GetMapOpt(key string) ValueMap
 - func (m ValueMap) GetPath(path string, allowMissing bool) (any, error)
 - func (m ValueMap) GetRequired(k string) (any, error)
 - func (m ValueMap) GetString(key string, allowEmpty bool) (string, error)
 - func (m ValueMap) GetStringArray(key string, allowEmpty bool) ([]string, error)
 - func (m ValueMap) GetStringArrayOpt(key string) []string
 - func (m ValueMap) GetStringOpt(key string) string
 - func (m ValueMap) GetStringPtr(key string) *string
 - func (m ValueMap) GetTime(key string, allowEmpty bool) (*time.Time, error)
 - func (m ValueMap) GetTimeOpt(key string) time.Time
 - func (m ValueMap) GetType(key string, ret any) error
 - func (m ValueMap) GetUUID(key string, allowEmpty bool) (*uuid.UUID, error)
 - func (m ValueMap) GetUUIDOpt(key string) uuid.UUID
 - func (m ValueMap) HasKey(key string) bool
 - func (m ValueMap) JSON() string
 - func (m ValueMap) Keys() []string
 - func (m ValueMap) KeysAndValues() ([]string, []any)
 - func (m ValueMap) MarshalXML(e *xml.Encoder, _ xml.StartElement) error
 - func (m ValueMap) Merge(args ...ValueMap) ValueMap
 - func (m ValueMap) Overwrite(sourceMap ValueMap) ValueMap
 - func (m ValueMap) ParseArray(path string, allowMissing bool, allowEmpty bool, coerce bool) ([]any, error)
 - func (m ValueMap) ParseArrayFloat(path string, allowMissing bool, allowEmpty bool) ([]float64, error)
 - func (m ValueMap) ParseArrayInt(path string, allowMissing bool, allowEmpty bool) ([]int, error)
 - func (m ValueMap) ParseArrayMap(path string, allowMissing bool, allowEmpty bool) ([]ValueMap, error)
 - func (m ValueMap) ParseArrayString(path string, allowMissing bool, allowEmpty bool) ([]string, error)
 - func (m ValueMap) ParseBool(path string, allowMissing bool, allowEmpty bool) (bool, error)
 - func (m ValueMap) ParseFloat(path string, allowMissing bool, allowEmpty bool) (float64, error)
 - func (m ValueMap) ParseInt(path string, allowMissing bool, allowEmpty bool) (int, error)
 - func (m ValueMap) ParseInt64(path string, allowMissing bool, allowEmpty bool) (int64, error)
 - func (m ValueMap) ParseJSON(path string, allowMissing bool, allowEmpty bool) (any, error)
 - func (m ValueMap) ParseMap(path string, allowMissing bool, allowEmpty bool) (ValueMap, error)
 - func (m ValueMap) ParseString(path string, allowMissing bool, allowEmpty bool) (string, error)
 - func (m ValueMap) ParseTime(path string, allowMissing bool, allowEmpty bool) (*time.Time, error)
 - func (m ValueMap) ParseUUID(path string, allowMissing bool, allowEmpty bool) (*uuid.UUID, error)
 - func (m ValueMap) SetPath(path string, val any) error
 - func (m ValueMap) String() string
 - func (m ValueMap) ToQueryString() string
 - func (m ValueMap) ToStringMap() map[string]string
 - func (m ValueMap) With(k string, v any) ValueMap
 - func (m ValueMap) WithoutKeys(keys ...string) ValueMap
 
Constants ¶
      View Source
      
  
    const ( BoolTrue = "true" BoolFalse = "false" )
      View Source
      
  
const ( AppKey = "projectforge" AppName = "Project Forge" AppSummary = "Build and maintain feature-rich applications using Golang" AppPort = 40000 AppContact = "Kyle U <projectforge@kyleu.com>" AppURL = "https://projectforge.dev" AppSource = "https://github.com/kyleu/projectforge" AppLegal = `Built by <a href="mailto:projectforge@kyleu.com">Kyle U</a>, all rights reserved` KeyDebug = "debug" KeyError = "error" KeyRandom = "random" KeyStart = "start" KeyUnknown = "unknown" KeyCSV = "csv" KeyJSON = "json" KeyTOML = "toml" KeyXML = "xml" KeyYAML = "yaml" ExtJSON = ".json" ExtMarkdown = ".md" OK = "ok" // $PF_SECTION_START(keys)$. DatabaseMySQL = "mysql" DatabasePostgreSQL = "postgres" DatabaseSQLite = "sqlite" DatabaseSQLServer = "sqlserver" KeyDetail = "detail" KeySimple = "simple" ExtCS = ".cs" ExtCSHTML = ".cshtml" ExtCSS = ".css" ExtGo = ".go" ExtHTML = ".html" ExtJS = ".js" ExtMod = ".mod" ExtSQL = ".sql" ExtSVG = ".svg" ExtTS = ".ts" )
Variables ¶
      View Source
      
  
    var ( DEBUG = false ConfigDir = "." )
      View Source
      
  
    var EmptyStruct = struct{}{}
    
      View Source
      
  
    var HTTPDefaultClient = http.DefaultClient
    
      View Source
      
  
    var SVGIconKeys = []string{} /* 170 elements not displayed */
    
      View Source
      
  
    var SVGLibrary = map[string]string{}/* 171 elements not displayed */
    
      View Source
      
  
    var StringDefaultLinebreak = func() string { if runtime.GOOS == "windows" { return winLB } return saneLB }()
      View Source
      
  
var UUIDDefault = uuid.UUID{}
    Functions ¶
func ArrayDereference ¶ added in v0.9.29
func ArrayDereference[T any](x []*T) []T
func ArrayFirstN ¶ added in v0.8.15
func ArrayFlatten ¶ added in v0.8.15
func ArrayFlatten[T any](arrs ...[]T) []T
func ArrayFromAny ¶ added in v0.2.32
func ArrayLastN ¶ added in v0.8.15
func ArrayLimit ¶ added in v1.4.9
func ArrayRemoveDuplicates ¶ added in v0.2.33
func ArrayRemoveDuplicates[T comparable](x []T) []T
func ArrayRemoveEmpty ¶ added in v1.5.20
func ArrayRemoveEmpty[T comparable](x []T) []T
func ArrayRemoveNil ¶ added in v0.6.15
func ArrayRemoveNil[T any](x []*T) []*T
func ArraySorted ¶ added in v0.10.14
func ArraySplit ¶ added in v1.4.5
func ArrayToStringArray ¶ added in v1.0.7
func ArrayTransform ¶ added in v1.0.6
func AsyncCollect ¶ added in v0.2.29
func AsyncCollectMap ¶ added in v0.6.9
func AsyncRateLimit ¶ added in v0.6.0
func ByteSizeIEC ¶ added in v0.2.38
func ByteSizeSI ¶ added in v0.2.38
func ConfigureAcronym ¶ added in v1.4.5
func ConfigureAcronym(key, val string)
func CountryFlag ¶ added in v0.6.3
func DebugBuildInfo ¶ added in v0.11.5
func DebugMemStats ¶ added in v0.11.5
func DebugStartCPUProfile ¶ added in v0.11.5
func DebugStartCPUProfile() error
func DebugTakeHeapProfile ¶ added in v0.11.5
func DebugTakeHeapProfile() error
func DecryptMessage ¶
func DefaultIfNil ¶ added in v0.7.21
func DefaultIfNil[T any](ptr *T, d T) T
func DefaultValue ¶ added in v1.4.5
func DefaultValue[T any]() T
func EncryptMessage ¶
func ErrorMerge ¶ added in v0.3.15
func FormatSeconds ¶ added in v1.2.18
func FormatSecondsFull ¶ added in v1.2.19
func FromJSONAny ¶ added in v1.1.0
func FromJSONAny(msg json.RawMessage) (any, error)
func FromJSONAnyOK ¶ added in v1.5.17
func FromJSONAnyOK(msg json.RawMessage) any
func FromJSONObj ¶ added in v1.3.7
func FromJSONObj[T any](msg json.RawMessage) (T, error)
func FromJSONStrict ¶
func FromJSONStrict(msg json.RawMessage, tgt any) error
func FromJSONString ¶ added in v0.11.14
func FromJSONString(msg json.RawMessage) (string, error)
func FromTOMLAny ¶ added in v1.3.0
func FromTOMLStrict ¶ added in v1.3.0
func FromTOMLString ¶ added in v1.3.0
func FromXMLAny ¶ added in v1.1.0
func FromXMLStrict ¶ added in v1.1.0
func FromXMLString ¶ added in v1.1.0
func GetEnvBool ¶ added in v0.2.14
func GetEnvDuration ¶ added in v0.3.8
func HashFNV128UUID ¶ added in v1.0.9
func HashSHA256 ¶
HashSHA256 returns a Base64-encoded string representing the SHA-256 hash of the argument.
func InitAcronyms ¶ added in v1.0.6
func JoinLinesFull ¶ added in v1.1.0
func MapGetOrElse ¶ added in v1.4.3
func MapGetOrElse[K comparable, V any](mp map[K]V, k K, dflt V) V
func MarkdownTable ¶ added in v0.2.9
func MarkdownTableParse ¶ added in v1.0.21
func MicrosToMillis ¶
func OrDefault ¶ added in v1.4.5
func OrDefault[T comparable](x T, dflt T) T
func ParseArray ¶ added in v1.4.3
func ParseArrayFloat ¶ added in v1.4.3
func ParseArrayInt ¶ added in v1.4.3
func ParseArrayString ¶ added in v1.4.3
func ParseFloat ¶ added in v1.4.3
func ParseInt64 ¶ added in v1.5.24
func ParseString ¶ added in v1.4.3
func RandomBool ¶
func RandomBool() bool
func RandomBytes ¶
func RandomDate ¶
func RandomElement ¶ added in v1.4.7
func RandomElement[T any](slice []T) T
func RandomElements ¶ added in v1.0.12
func RandomFloat ¶ added in v0.5.1
func RandomIcon ¶ added in v1.0.5
func RandomIcon() string
func RandomInt64 ¶ added in v1.5.24
func RandomString ¶
func ReplaceEnvVars ¶
func RunProcess ¶
func StartProcess ¶ added in v0.6.10
func StringArrayFromAny ¶ added in v1.1.1
func StringArrayMaxLength ¶
func StringArrayOxfordComma ¶
func StringArrayQuoted ¶
func StringDetectLinebreak ¶ added in v0.10.23
func StringForms ¶
func StringNullable ¶ added in v1.1.0
func StringPlural ¶
func StringRepeat ¶
func StringReplaceBetween ¶ added in v0.7.5
func StringSplitAndTrim ¶
func StringSplitLastOnly ¶ added in v0.10.20
func StringSplitLines ¶ added in v0.10.23
func StringSplitLinesIndented ¶ added in v0.12.3
func StringSplitPath ¶ added in v0.10.20
func StringSplitPathAndTrim ¶ added in v0.10.19
func StringSubstringBetween ¶ added in v0.7.5
func StringToCamel ¶
func StringToLowerCamel ¶
func StringToPlural ¶
func StringToSingular ¶
func StringToSnake ¶ added in v0.3.15
func StringToTitle ¶
func StringTruncate ¶
func TimeCurrent ¶ added in v0.10.14
func TimeCurrentMillis ¶
func TimeCurrentMillis() int64
func TimeCurrentNanos ¶ added in v0.10.14
func TimeCurrentNanos() int64
func TimeCurrentP ¶ added in v0.10.14
func TimeCurrentUnix ¶ added in v0.10.14
func TimeCurrentUnix() int64
func TimeFromStringSimple ¶ added in v1.0.12
func TimeRelative ¶
func TimeToFull ¶
func TimeToFullMS ¶ added in v1.0.16
func TimeToHTML ¶
func TimeToHours ¶ added in v1.0.21
func TimeToJSFull ¶ added in v1.2.18
func TimeToRFC3339 ¶ added in v1.0.26
func TimeToVerbose ¶ added in v0.9.17
func ToCSVBytes ¶ added in v1.1.0
func ToJSONBytes ¶
func ToJSONCompact ¶
func ToTOMLBytes ¶ added in v1.3.0
func ToXMLCompact ¶ added in v1.1.0
func UUIDFromString ¶
func UUIDFromStringOK ¶ added in v0.8.24
func UUIDString ¶ added in v0.6.24
Types ¶
type DebugInfo ¶
type DebugInfo struct {
	ServerTags  *OrderedMap[string]
	AppTags     *OrderedMap[string]
	RuntimeTags *OrderedMap[string]
	Mods        []*debug.Module
}
    type Diff ¶
type Diff struct {
	Path string `json:"path"`
	Old  string `json:"o,omitempty"`
	New  string `json:"n"`
}
    func (Diff) StringVerbose ¶ added in v0.5.6
type Diffs ¶
type Diffs []*Diff
func DiffObjectsIgnoring ¶
func RandomDiffs ¶
func (Diffs) StringVerbose ¶ added in v0.5.6
type ErrorDetail ¶
type ErrorDetail struct {
	Type       string            `json:"type" xml:"type"`
	Message    string            `json:"message" xml:"message"`
	Stack      []ErrorFrame      `json:"stack,omitempty" xml:"stack,omitempty"`
	StackTrace errors.StackTrace `json:"-" xml:"-"`
	Cause      *ErrorDetail      `json:"cause,omitempty" xml:"cause,omitempty"`
}
    func GetErrorDetail ¶
func GetErrorDetail(e error, includeStack bool) *ErrorDetail
type ErrorFrame ¶
func TraceDetail ¶
func TraceDetail(trace errors.StackTrace) []ErrorFrame
type FieldDesc ¶ added in v0.12.0
type FieldDescResults ¶ added in v1.5.5
type FieldDescResults struct {
	FieldDescs FieldDescs `json:"fieldDescs"`
	Values     ValueMap   `json:"values"`
	Missing    []string   `json:"missing,omitempty"`
}
    func FieldDescsCollect ¶ added in v1.5.5
func FieldDescsCollect(r *http.Request, args FieldDescs) *FieldDescResults
func (*FieldDescResults) HasMissing ¶ added in v1.5.5
func (a *FieldDescResults) HasMissing() bool
type FieldDescs ¶ added in v0.12.0
type FieldDescs []*FieldDesc
func (FieldDescs) Get ¶ added in v1.2.17
func (d FieldDescs) Get(key string) *FieldDesc
func (FieldDescs) Keys ¶ added in v1.1.0
func (d FieldDescs) Keys() []string
type HTTPRequest ¶ added in v1.4.5
func NewHTTPGet ¶ added in v1.5.22
func NewHTTPGet(ctx context.Context, url string) *HTTPRequest
func NewHTTPPost ¶ added in v1.5.22
func NewHTTPRequest ¶ added in v1.4.5
func (*HTTPRequest) RunSimple ¶ added in v1.4.5
func (r *HTTPRequest) RunSimple() (*http.Response, []byte, error)
func (*HTTPRequest) WithClient ¶ added in v1.4.5
func (r *HTTPRequest) WithClient(c *http.Client) *HTTPRequest
func (*HTTPRequest) WithHeader ¶ added in v1.4.5
func (r *HTTPRequest) WithHeader(k string, v string) *HTTPRequest
type KeyTypeDesc ¶ added in v0.2.9
type KeyTypeDesc struct {
	Key         string `json:"key"`
	Type        string `json:"type"`
	Description string `json:"description"`
}
    func (*KeyTypeDesc) Array ¶ added in v0.2.9
func (k *KeyTypeDesc) Array(key string) []string
func (*KeyTypeDesc) Matches ¶ added in v1.2.16
func (k *KeyTypeDesc) Matches(x *KeyTypeDesc) bool
func (*KeyTypeDesc) String ¶ added in v1.5.14
func (k *KeyTypeDesc) String() string
type KeyTypeDescs ¶ added in v0.2.9
type KeyTypeDescs []*KeyTypeDesc
func (KeyTypeDescs) Array ¶ added in v0.2.9
func (k KeyTypeDescs) Array(key string) [][]string
func (KeyTypeDescs) Sort ¶ added in v0.2.9
func (k KeyTypeDescs) Sort() KeyTypeDescs
func (KeyTypeDescs) Strings ¶ added in v1.5.14
func (k KeyTypeDescs) Strings() []string
type NilBool ¶ added in v1.2.7
func (NilBool) MarshalJSON ¶ added in v1.2.7
func (*NilBool) UnmarshalJSON ¶ added in v1.2.7
type NilFloat64 ¶ added in v1.2.7
type NilFloat64 struct {
	sql.NullFloat64
}
    func (NilFloat64) MarshalJSON ¶ added in v1.2.7
func (n NilFloat64) MarshalJSON() ([]byte, error)
func (*NilFloat64) UnmarshalJSON ¶ added in v1.2.7
func (n *NilFloat64) UnmarshalJSON(data []byte) error
type NilInt32 ¶ added in v1.2.7
func (NilInt32) MarshalJSON ¶ added in v1.2.7
func (*NilInt32) UnmarshalJSON ¶ added in v1.2.7
type NilInt64 ¶ added in v1.2.7
func (NilInt64) MarshalJSON ¶ added in v1.2.7
func (*NilInt64) UnmarshalJSON ¶ added in v1.2.7
type NilJSON ¶ added in v1.5.17
type NilJSON struct {
	sql.Null[json.RawMessage]
}
    func (NilJSON) MarshalJSON ¶ added in v1.5.17
func (*NilJSON) UnmarshalJSON ¶ added in v1.5.17
type NilString ¶ added in v1.2.7
type NilString struct {
	sql.NullString
}
    func (NilString) MarshalJSON ¶ added in v1.2.7
func (*NilString) UnmarshalJSON ¶ added in v1.2.7
type NilTime ¶ added in v1.2.7
func (NilTime) MarshalJSON ¶ added in v1.2.7
func (*NilTime) UnmarshalJSON ¶ added in v1.2.7
type Node ¶ added in v1.0.18
type OrderedMap ¶
func NewOMap ¶ added in v1.2.21
func NewOMap[V any]() *OrderedMap[V]
func NewOrderedMap ¶
func NewOrderedMap[V any](lexical bool, capacity int) *OrderedMap[V]
func (*OrderedMap[V]) Append ¶
func (o *OrderedMap[V]) Append(k string, v V)
func (*OrderedMap[V]) Clone ¶ added in v1.5.16
func (o *OrderedMap[V]) Clone() *OrderedMap[V]
func (*OrderedMap[V]) Get ¶
func (o *OrderedMap[V]) Get(k string) (V, bool)
func (*OrderedMap[V]) GetSimple ¶
func (o *OrderedMap[V]) GetSimple(k string) V
func (*OrderedMap[V]) HasKey ¶ added in v1.2.21
func (o *OrderedMap[V]) HasKey(k string) bool
func (*OrderedMap[V]) IndexOf ¶ added in v1.2.21
func (o *OrderedMap[V]) IndexOf(k string) int
func (OrderedMap[V]) MarshalJSON ¶
func (o OrderedMap[V]) MarshalJSON() ([]byte, error)
func (OrderedMap[V]) MarshalXML ¶
func (o OrderedMap[V]) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (OrderedMap[V]) MarshalYAML ¶
func (o OrderedMap[V]) MarshalYAML() (any, error)
func (*OrderedMap[V]) Pairs ¶ added in v1.2.21
func (o *OrderedMap[V]) Pairs() []*OrderedPair[V]
func (*OrderedMap[V]) Remove ¶ added in v1.2.21
func (o *OrderedMap[V]) Remove(k string)
func (*OrderedMap[V]) Set ¶ added in v1.2.21
func (o *OrderedMap[V]) Set(k string, v V)
func (*OrderedMap[V]) UnmarshalJSON ¶
func (o *OrderedMap[V]) UnmarshalJSON(b []byte) error
type OrderedPair ¶ added in v1.2.21
type Progress ¶ added in v1.4.2
type Progress struct {
	Key       string `json:"key,omitempty"`
	Total     int    `json:"total,omitempty"`
	Completed int    `json:"completed,omitempty"`
	// contains filtered or unexported fields
}
    func NewProgress ¶ added in v1.4.2
type Set ¶ added in v1.5.18
func (Set[T]) MarshalJSON ¶ added in v1.5.18
func (Set[T]) MarshalXML ¶ added in v1.5.18
func (Set[T]) MarshalYAML ¶ added in v1.5.18
func (*Set[T]) UnmarshalJSON ¶ added in v1.5.18
type StringSlice ¶ added in v1.1.1
type StringSlice struct {
	Slice []string
}
    func NewStringSlice ¶ added in v1.1.1
func NewStringSlice(a []string) *StringSlice
func (*StringSlice) Empty ¶ added in v1.1.1
func (s *StringSlice) Empty() bool
func (*StringSlice) Join ¶ added in v1.1.1
func (s *StringSlice) Join(x string) string
func (*StringSlice) Push ¶ added in v1.1.1
func (s *StringSlice) Push(strs ...string)
func (*StringSlice) Pushf ¶ added in v1.1.1
func (s *StringSlice) Pushf(msg string, args ...any)
func (*StringSlice) Sort ¶ added in v1.1.1
func (s *StringSlice) Sort()
func (*StringSlice) String ¶ added in v1.3.1
func (s *StringSlice) String() string
type Timer ¶ added in v0.2.9
func TimerStart ¶
func TimerStart() *Timer
type Tree ¶ added in v1.0.18
type ValueMap ¶
func FromJSONMap ¶ added in v0.11.14
func FromJSONMap(msg json.RawMessage) (ValueMap, error)
func FromTOMLMap ¶ added in v1.3.0
func FromXMLMap ¶ added in v1.1.0
func ParseArrayMap ¶ added in v1.4.3
func RandomValueMap ¶
func ValueMapFor ¶
func ValueMapFrom ¶ added in v1.5.24
func (ValueMap) GetArrayOpt ¶ added in v1.0.7
func (ValueMap) GetBoolOpt ¶ added in v0.2.33
func (ValueMap) GetFloatArray ¶ added in v1.0.7
func (ValueMap) GetFloatOpt ¶ added in v1.0.7
func (ValueMap) GetIntArray ¶ added in v1.0.7
func (ValueMap) GetMapArray ¶ added in v1.0.7
func (ValueMap) GetStringArray ¶
func (ValueMap) GetStringArrayOpt ¶ added in v1.0.7
func (ValueMap) GetStringOpt ¶
func (ValueMap) GetStringPtr ¶ added in v0.8.23
func (ValueMap) KeysAndValues ¶
func (ValueMap) MarshalXML ¶
func (ValueMap) ParseArray ¶
func (ValueMap) ParseArrayFloat ¶ added in v1.0.7
func (ValueMap) ParseArrayInt ¶ added in v0.3.16
func (ValueMap) ParseArrayMap ¶ added in v1.0.7
func (ValueMap) ParseArrayString ¶ added in v0.3.16
func (ValueMap) ParseFloat ¶
func (ValueMap) ParseInt64 ¶ added in v1.5.24
func (ValueMap) ParseString ¶
func (ValueMap) ToQueryString ¶
func (ValueMap) ToStringMap ¶ added in v0.11.6
func (ValueMap) WithoutKeys ¶ added in v1.2.10
      
      Source Files
      ¶
    
- acronym.go
 - array.go
 - async.go
 - bool.go
 - byte.go
 - casing.go
 - csv.go
 - debug.go
 - diff.go
 - encryption.go
 - env.go
 - errors.go
 - fielddesc.go
 - http.go
 - json.go
 - keys.go
 - keyval.go
 - lines.go
 - log.go
 - map.go
 - mapget.go
 - mapordered.go
 - mapparse.go
 - mappath.go
 - markdown.go
 - nil.go
 - numeric.go
 - parse.go
 - parsearray.go
 - pkg.go
 - plural.go
 - process.go
 - progress.go
 - random.go
 - set.go
 - string.go
 - stringslice.go
 - svg.go
 - time.go
 - timefmt.go
 - timer.go
 - toml.go
 - tree.go
 - uuid.go
 - xml.go
 
 Click to show internal directories. 
   Click to hide internal directories.