Documentation
¶
Overview ¶
Code generated from files in client/src/svg. See https://projectforge.dev for details. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func Acronym(s string) string
- func ArrayCopy[S ~[]T, T any](x S) S
- func ArrayDereference[T any](x []*T) []T
- func ArrayFindDuplicates[T comparable](items []T) []T
- func ArrayFirstN[S ~[]T, T any](items S, n int) S
- func ArrayFlatten[S ~[]T, T any](arrs ...S) S
- func ArrayFromAny[T any](dest any) ([]T, error)
- func ArrayFromAnyOK[T any](dest any) []T
- func ArrayLastN[S ~[]T, T any](items S, n int) S
- func ArrayLimit[S ~[]T, T any](x S, limit int) (S, int)
- func ArrayRemoveDuplicates[T comparable](x []T) []T
- func ArrayRemoveEmpty[T comparable](x []T) []T
- func ArrayRemoveNil[T any](x []*T) []*T
- func ArrayReplaceOrAdd[S ~[]T, T any](a S, fn func(el T) bool, x T) S
- func ArraySorted[T cmp.Ordered](x []T) []T
- func ArraySplit[S ~[]T, T any](xs S, fn func(T) bool) (S, S)
- func ArrayTest(dest any) bool
- func ArrayToAnyArray[T any](x []T) []any
- 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 Cast[T any](v any) (T, error)
- func CastOK[T any](v any, loggers ...Logger) T
- 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 DecodeBytes(s string) ([]byte, error)
- func DecodeUTF8(input []byte) (string, error)
- func DecryptBytes(key []byte, b []byte, logger Logger) ([]byte, 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 EncodeBytes(b []byte) string
- func EncryptBytes(key []byte, b []byte, logger Logger) ([]byte, error)
- func EncryptMessage(key []byte, message string, logger Logger) (string, error)
- func ErrorMerge(errs ...error) error
- func Filename(s string) string
- func FormatMilliseconds(x float64, includeFraction bool) string
- func FormatSeconds(x float64) string
- func FormatSecondsFull(x float64) string
- func FromJSON(msg []byte, tgt any) error
- func FromJSONAny(msg []byte) (any, error)
- func FromJSONAnyOK(msg []byte) any
- func FromJSONBytesArray[T any](vs ...jsontext.Value) ([]T, error)
- func FromJSONBytesMap[T any](m map[string]jsontext.Value) (map[string]T, error)
- func FromJSONObj[T any](msg []byte) (T, error)
- func FromJSONReader(r io.Reader, tgt any, opts ...json.Options) error
- func FromJSONStrict(msg []byte, tgt any) error
- func FromJSONString(msg []byte) (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 GetEnvBoolAny(defaultValue bool, names ...string) bool
- func GetEnvDuration(name string, defaultValue time.Duration) time.Duration
- func GetEnvInt(name string, defaultValue int) int
- func HashFNV32(s string) uint32
- func HashFNV128UUID(s string) uuid.UUID
- func HashSHA256(s string) string
- func InitAcronyms(extras ...string) error
- func IsNil(x any) bool
- 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 MapClone[K comparable, V any](m map[K]V) map[K]V
- 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 MapKeys[K comparable, V any](m map[K]V) []K
- func MapKeysSorted[K cmp.Ordered, V any](m map[K]V) []K
- func MapUpdateKeys[K cmp.Ordered, V any, NK cmp.Ordered](m map[K]V, fn func(k K, v V) NK) map[NK]V
- func MapUpdateValues[K comparable, V any, NV any](m map[K]V, fn func(k K, v V) (NV, error)) (map[K]NV, error)
- func MarkdownTable(header []string, rows [][]string, linebreak string) (string, error)
- func MarkdownTableParse(md string) ([]string, [][]string)
- func MicrosToMillis(i int) string
- func MillisToString(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 ParseBoolSimple(r any) bool
- func ParseFloat(r any, path string, allowEmpty bool) (float64, error)
- func ParseFloatSimple(r any) float64
- func ParseInt(r any, path string, allowEmpty bool) (int, error)
- func ParseInt16(r any, path string, allowEmpty bool) (int16, error)
- func ParseInt16Simple(r any) int16
- func ParseInt32(r any, path string, allowEmpty bool) (int32, error)
- func ParseInt32Simple(r any) int32
- func ParseInt64(r any, path string, allowEmpty bool) (int64, error)
- func ParseInt64Simple(r any) int64
- func ParseIntSimple(r any) int
- func ParseJSON(r any, path string, allowEmpty bool) (any, error)
- func ParseJSONSimple(r any) any
- func ParseString(r any, path string, allowEmpty bool) (string, error)
- func ParseStringSimple(r any) string
- func ParseTime(r any, path string, allowEmpty bool) (*time.Time, error)
- func ParseTimeSimple(r any) *time.Time
- func ParseUUID(r any, path string, allowEmpty bool) (*uuid.UUID, error)
- func ParseUUIDSimple(r any) *uuid.UUID
- func Percent(f float64) string
- 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 RandomID() string
- func RandomIcon() string
- func RandomInt(maxExclusive int) int
- func RandomInt16(maxExclusive int16) int16
- func RandomInt32(maxExclusive int32) int32
- 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 StringCut(s string, sep byte, cutc bool) (string, string)
- func StringCutLast(s string, sep byte, cutc bool) (string, string)
- func StringDetectLinebreak(s string) string
- func StringFilePath(elems ...string) string
- func StringForms(s string) (string, string)
- func StringJoin(elems []string, delim 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 StringPath(elems ...string) 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 StringSplitAndTrim(s string, delim 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 StringToInitials(s string, extraAcronyms ...string) string
- func StringToKebab(s string, extraAcronyms ...string) string
- func StringToPlural(s string) string
- func StringToProper(s string, extraAcronyms ...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 TimeFromMillis(ms int) (*time.Time, error)
- func TimeFromRFC3339(s string) (*time.Time, error)
- func TimeFromString(s string) (*time.Time, error)
- func TimeFromStringFmt(s string, format 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 TimePlusDays(t *time.Time, days int) *time.Time
- func TimeRelative(t *time.Time) string
- func TimeRounded(t time.Time, d time.Duration) time.Time
- func TimeRoundedP(t *time.Time, d time.Duration) *time.Time
- func TimeToDateString(d *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 Diffable
- 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 MergeSet
- func (m *MergeSet[K, T]) Clone() *MergeSet[K, T]
- func (m *MergeSet[K, T]) Contains(x T) bool
- func (m *MergeSet[K, T]) Entries() []T
- func (m *MergeSet[K, T]) Length() int
- func (m *MergeSet[K, T]) MarshalJSON() ([]byte, error)
- func (m MergeSet[K, T]) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (m *MergeSet[K, T]) MarshalYAML() (any, error)
- func (m *MergeSet[K, T]) Merge(other *MergeSet[K, T]) (*MergeSet[K, T], error)
- func (m *MergeSet[K, T]) Remove(x T)
- func (m *MergeSet[K, T]) Set(v T) error
- func (m *MergeSet[K, T]) UnmarshalJSON(b []byte) error
- type Mergeable
- type NilBool
- type NilFloat64
- type NilInt32
- type NilInt64
- type NilJSON
- type NilString
- type NilTime
- type Node
- type Nodes
- type OrderedMap
- func FromJSONOrderedMap[V any](msg []byte) (*OrderedMap[V], error)
- func NewOMap[V any]() *OrderedMap[V]
- func NewOrderedMap[V any](lexical bool, capacity int, pairs ...*OrderedPair[V]) *OrderedMap[V]
- func OrderedMapFromMap[V any](m map[string]V, lexical bool) *OrderedMap[V]
- func ParseOrderedMap(r any, path string, allowEmpty bool) (*OrderedMap[any], error)
- func ParseOrderedMapSimple(r any) *OrderedMap[any]
- func (o *OrderedMap[V]) Clear()
- func (o *OrderedMap[V]) Clone() *OrderedMap[V]
- func (o *OrderedMap[V]) Empty() bool
- 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]) Keys() []string
- func (o *OrderedMap[V]) Length() 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]) Merge(defs *OrderedMap[V]) *OrderedMap[V]
- 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]) SetAll(m map[string]V)
- func (o *OrderedMap[V]) ToMap() ValueMap
- func (o *OrderedMap[V]) ToOrderedMap() *OrderedMap[V]
- func (o *OrderedMap[V]) ToOrderedMapAny() *OrderedMap[any]
- func (o *OrderedMap[V]) UnmarshalJSON(data []byte) error
- type OrderedMaps
- type OrderedPair
- type OrderedPairs
- 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 Str
- func (s Str) Append(strs ...string) Str
- func (s Str) Contains(x string) bool
- func (s Str) ContainsAny(x string) bool
- func (s Str) ContainsRune(chr rune) bool
- func (s Str) Cut(sep byte, cutc bool) (Str, Str)
- func (s Str) CutLast(sep byte, cutc bool) (Str, Str)
- func (s Str) DetectLinebreak() string
- func (s Str) Empty() bool
- func (s Str) Equal(x string) bool
- func (s Str) EqualFold(x string) bool
- func (s Str) FilePath(elems ...string) Str
- func (s Str) HasPrefix(prefix string) bool
- func (s Str) HasSuffix(suffix string) bool
- func (s Str) Index(substring string) int
- func (s Str) Join(elems Strings, delim string) Str
- func (s Str) JoinStrings(elems []string, delim string) Str
- func (s Str) Length() int
- func (s Str) OrDefault(dflt string) Str
- func (s Str) Pad(size int) Str
- func (s Str) PadLeft(size int, chr rune) Str
- func (s Str) PadRight(size int, chr rune) Str
- func (s Str) ParseInt() (int, bool)
- func (s Str) ParseUUID() *uuid.UUID
- func (s Str) Path(elems ...string) Str
- func (s Str) Repeat(n int) Str
- func (s Str) Replace(old string, nw string, n int) Str
- func (s Str) ReplaceAll(old string, nw string) Str
- func (s Str) ReplaceBetween(left string, right string, replacement string) (Str, error)
- func (s Str) Split(delim string) Strings
- func (s Str) SplitAndTrim(delim string) Strings
- func (s Str) SplitLastOnly(sep byte, cutc bool) Str
- func (s Str) SplitLines() Strings
- func (s Str) SplitLinesIndented(indent int, indentFirstLine bool, includeEmptyLines bool) Strings
- func (s Str) SplitPath() (string, string)
- func (s Str) SplitPathAndTrim() Strings
- func (s Str) String() string
- func (s Str) Substring(start int, end int) Str
- func (s Str) SubstringBetween(left string, right string) Str
- func (s Str) ToCamel() Str
- func (s Str) ToKebab() Str
- func (s Str) ToLower() Str
- func (s Str) ToProper() Str
- func (s Str) ToSnake() Str
- func (s Str) ToUpper() Str
- func (s Str) TrimPrefix(prefix string) Str
- func (s Str) TrimSpace() Str
- func (s Str) TrimSuffix(suffix string) Str
- func (s Str) Truncate(mx int) Str
- func (s Str) With(elems ...Str) Strings
- func (s Str) WithPrefix(prefixes ...Str) Str
- func (s Str) WithStrings(elems ...string) Strings
- func (s Str) WithSuffix(suffixes ...Str) Str
- type StringSlice
- func (s *StringSlice) Empty() bool
- func (s *StringSlice) Join(x string) string
- func (s *StringSlice) JoinCommas() string
- func (s *StringSlice) JoinSimple() string
- func (s *StringSlice) JoinSpace() string
- func (s *StringSlice) Length() int
- func (s *StringSlice) MarshalJSON() ([]byte, error)
- func (s *StringSlice) Push(strs ...string)
- func (s *StringSlice) PushUnique(strs ...string)
- func (s *StringSlice) Pushf(msg string, args ...any)
- func (s *StringSlice) PushfUnlessNil(msg string, args ...any)
- func (s *StringSlice) SliceSafe() []string
- func (s *StringSlice) Sort()
- func (s *StringSlice) String() string
- func (s *StringSlice) TotalLength() int
- func (s *StringSlice) UnmarshalJSON(data []byte) error
- type Strings
- type Timer
- type ToMap
- type ToMaps
- type ToOrderedMap
- type ToOrderedMapAny
- type ToOrderedMaps
- type Tree
- type ValueMap
- func FromJSONMap(msg []byte) (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 ParseMapSimple(r any) ValueMap
- func RandomValueMap(keys int) ValueMap
- func ValueMapFor(kvs ...any) ValueMap
- func ValueMapFrom(m map[string]any) ValueMap
- func ValueMapFromAny(x any) (ValueMap, error)
- func ValueMapFromAnyOK(x 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) Empty() bool
- 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) GetArrayOr(key string, dflt []any, allowEmpty bool) []any
- func (m ValueMap) GetBool(key string, allowEmpty bool) (bool, error)
- func (m ValueMap) GetBoolOpt(key string) bool
- func (m ValueMap) GetBoolOr(key string, dflt bool, allowEmpty bool) bool
- func (m ValueMap) GetFloat(key string, allowEmpty bool) (float64, error)
- func (m ValueMap) GetFloatArray(key string, allowEmpty bool) ([]float64, error)
- func (m ValueMap) GetFloatArrayOpt(key string) []float64
- func (m ValueMap) GetFloatArrayOr(key string, dflt []float64, allowEmpty bool) []float64
- func (m ValueMap) GetFloatOpt(key string) float64
- func (m ValueMap) GetFloatOr(key string, dflt float64, allowEmpty bool) float64
- func (m ValueMap) GetInt(key string, allowEmpty bool) (int, error)
- func (m ValueMap) GetInt64(key string, allowEmpty bool) (int64, error)
- func (m ValueMap) GetInt64Opt(key string) int64
- func (m ValueMap) GetInt64Or(key string, dflt int64, allowEmpty bool) int64
- func (m ValueMap) GetIntArray(key string, allowEmpty bool) ([]int, error)
- func (m ValueMap) GetIntArrayOpt(key string) []int
- func (m ValueMap) GetIntArrayOr(key string, dflt []int, allowEmpty bool) []int
- func (m ValueMap) GetIntOpt(key string) int
- func (m ValueMap) GetIntOr(key string, dflt int, allowEmpty bool) int
- func (m ValueMap) GetMap(key string, allowEmpty bool) (ValueMap, error)
- func (m ValueMap) GetMapArray(key string, allowEmpty bool) ([]ValueMap, error)
- func (m ValueMap) GetMapArrayOpt(key string) []ValueMap
- func (m ValueMap) GetMapArrayOr(key string, dflt []ValueMap, allowEmpty bool) []ValueMap
- func (m ValueMap) GetMapOpt(key string) ValueMap
- func (m ValueMap) GetMapOr(key string, dflt ValueMap, allowEmpty bool) ValueMap
- func (m ValueMap) GetPath(path string, allowMissing bool) (any, error)
- func (m ValueMap) GetRequired(k string) (any, error)
- func (m ValueMap) GetRichString(key string, allowEmpty bool) (Str, error)
- func (m ValueMap) GetRichStringOpt(key string) Str
- 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) GetStringArrayOr(key string, dflt []string, allowEmpty bool) []string
- func (m ValueMap) GetStringOpt(key string) string
- func (m ValueMap) GetStringOr(key string, dflt string, allowEmpty bool) 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) GetTimeOr(key string, dflt *time.Time, allowEmpty bool) *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) GetUUIDOr(key string, dflt *uuid.UUID, allowEmpty bool) *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) Length() int
- 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) ParseInt16(path string, allowMissing bool, allowEmpty bool) (int16, error)
- func (m ValueMap) ParseInt32(path string, allowMissing bool, allowEmpty bool) (int32, 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) ReplaceEnvVars(logger Logger) ValueMap
- func (m ValueMap) SetPath(path string, val any) error
- func (m ValueMap) String() string
- func (m ValueMap) ToMap() ValueMap
- func (m ValueMap) ToOrderedMap() *OrderedMap[any]
- 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 = "admini" AppName = "Admini" AppSummary = "Use Admini to explore and manage your data as fast and easily as possible" AppPort = 14000 AppCmd = AppKey AppContact = "Kyle U" AppURL = "https://admini.dev" AppSource = "https://github.com/kyleu/admini" AppLegal = `Built by Kyle U, all rights reserved` KeyOK = "ok" KeySuccess = "success" KeyError = "error" KeyDebug = "debug" KeyStart = "start" KeyRandom = "random" KeyUnknown = "unknown" KeyEllipsis = "…" KeyCSV = "csv" KeyJSON = "json" KeyTOML = "toml" KeyXML = "xml" KeyYAML = "yaml" ExtJSON = ".json" ExtMarkdown = ".md" DatabaseMySQL = "mysql" DatabasePostgreSQL = "postgres" DatabaseSQLite = "sqlite" DatabaseSQLServer = "sqlserver" )
View Source
const KeyMap = "map"
View Source
const UUIDRegex = `[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`
Variables ¶
View Source
var ( DEBUG = false ConfigDir = "." )
View Source
var EmptyStruct = struct{}{}
View Source
var HTTPDefaultClient = http.DefaultClient
View Source
var SVGIconKeys = []string{"android", "app", "apple", "archive", "backward", "bell", "bolt", "bookmark", "calendar", "camera", "cart", "check", "clock", "code", "cog", "comment", "compass", "database", "desktop", "dna", "dot", "down", "download", "edit", "error", "export", "external", "eye", "file", "file-text", "filter", "fingerprint", "fire", "flag", "folder", "folder-open", "forward", "gift", "github", "graph", "grid", "handle", "happy", "hashtag", "heart", "image", "import", "info", "left", "link", "linux", "list", "location", "lock", "mail", "mail-open", "medal", "meh", "microphone", "minus", "mobile", "pencil", "play", "plus", "poo", "print", "profile", "question", "refresh", "reply", "right", "robot", "sad", "searchbox", "server", "settings", "share", "social", "sort", "star", "struct", "tag", "thumbs-down", "thumbs-up", "times", "tools", "trash", "trophy", "unlock", "up", "upload", "users", "warning", "windows", "world", "wrench"}
View Source
var SVGLibrary = map[string]string{
"android": ``,
"app": ``,
"apple": ``,
"archive": ``,
"backward": ``,
"bell": ``,
"bolt": ``,
"bookmark": ``,
"calendar": ``,
"camera": ``,
"cart": ``,
"check": ``,
"clock": ``,
"code": ``,
"cog": ``,
"comment": ``,
"compass": ``,
"database": ``,
"desktop": ``,
"dna": ``,
"dot": ``,
"down": ``,
"download": ``,
"edit": ``,
"error": ``,
"export": ``,
"external": ``,
"eye": ``,
"file": ``,
"file-text": ``,
"filter": ``,
"fingerprint": ``,
"fire": ``,
"flag": ``,
"folder": ``,
"folder-open": ``,
"forward": ``,
"gift": ``,
"github": ``,
"graph": ``,
"grid": ``,
"handle": ``,
"happy": ``,
"hashtag": ``,
"heart": ``,
"image": ``,
"import": ``,
"info": ``,
"left": ``,
"link": ``,
"linux": ``,
"list": ``,
"location": ``,
"lock": ``,
"mail": ``,
"mail-open": ``,
"medal": ``,
"meh": ``,
"microphone": ``,
"minus": ``,
"mobile": ``,
"pencil": ``,
"play": ``,
"plus": ``,
"poo": ``,
"print": ``,
"profile": ``,
"question": ``,
"refresh": ``,
"reply": ``,
"right": ``,
"robot": ``,
"sad": ``,
"search": ``,
"searchbox": ``,
"server": ``,
"settings": ``,
"share": ``,
"social": ``,
"sort": ``,
"star": ``,
"struct": ``,
"tag": ``,
"thumbs-down": ``,
"thumbs-up": ``,
"times": ``,
"tools": ``,
"trash": ``,
"trophy": ``,
"unlock": ``,
"up": ``,
"upload": ``,
"users": ``,
"warning": ``,
"windows": ``,
"world": ``,
"wrench": ``,
}
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.2.12
func ArrayDereference[T any](x []*T) []T
func ArrayFindDuplicates ¶ added in v0.6.1
func ArrayFindDuplicates[T comparable](items []T) []T
func ArrayFirstN ¶ added in v0.2.12
func ArrayFlatten ¶ added in v0.2.12
func ArrayFlatten[S ~[]T, T any](arrs ...S) S
func ArrayFromAny ¶ added in v0.2.3
func ArrayFromAnyOK ¶ added in v0.6.6
func ArrayLastN ¶ added in v0.2.12
func ArrayLimit ¶ added in v0.4.13
func ArrayRemoveDuplicates ¶ added in v0.2.4
func ArrayRemoveDuplicates[T comparable](x []T) []T
func ArrayRemoveEmpty ¶ added in v0.4.30
func ArrayRemoveEmpty[T comparable](x []T) []T
func ArrayRemoveNil ¶ added in v0.2.12
func ArrayRemoveNil[T any](x []*T) []*T
func ArrayReplaceOrAdd ¶ added in v0.4.36
func ArraySorted ¶ added in v0.2.12
func ArraySplit ¶ added in v0.4.10
func ArrayToAnyArray ¶ added in v0.6.6
func ArrayToStringArray ¶ added in v0.3.9
func ArrayTransform ¶ added in v0.3.8
func AsyncCollect ¶ added in v0.2.1
func AsyncCollectMap ¶ added in v0.2.12
func AsyncRateLimit ¶ added in v0.2.11
func ByteSizeIEC ¶ added in v0.2.14
func ByteSizeSI ¶ added in v0.2.14
func ConfigureAcronym ¶ added in v0.4.10
func ConfigureAcronym(key, val string)
func CountryFlag ¶ added in v0.2.11
func DebugBuildInfo ¶ added in v0.2.18
func DebugMemStats ¶ added in v0.2.18
func DebugStartCPUProfile ¶ added in v0.2.18
func DebugStartCPUProfile() error
func DebugTakeHeapProfile ¶ added in v0.2.18
func DebugTakeHeapProfile() error
func DecodeBytes ¶ added in v0.5.23
func DecodeUTF8 ¶ added in v0.4.40
func DecryptBytes ¶ added in v0.5.23
func DecryptMessage ¶
func DefaultIfNil ¶ added in v0.2.12
func DefaultIfNil[T any](ptr *T, d T) T
func DefaultValue ¶ added in v0.4.10
func DefaultValue[T any]() T
func EncodeBytes ¶ added in v0.5.23
func EncryptBytes ¶ added in v0.5.23
func EncryptMessage ¶
func ErrorMerge ¶ added in v0.2.5
func FormatMilliseconds ¶ added in v0.6.3
func FormatSeconds ¶ added in v0.4.4
func FormatSecondsFull ¶ added in v0.4.4
func FromJSONAny ¶ added in v0.4.0
func FromJSONAnyOK ¶ added in v0.4.26
func FromJSONBytesArray ¶ added in v0.6.6
func FromJSONBytesMap ¶ added in v0.6.6
func FromJSONObj ¶ added in v0.4.4
func FromJSONStrict ¶
func FromJSONString ¶ added in v0.2.27
func FromTOMLAny ¶ added in v0.4.4
func FromTOMLStrict ¶ added in v0.4.4
func FromTOMLString ¶ added in v0.4.4
func FromXMLAny ¶ added in v0.4.0
func FromXMLStrict ¶ added in v0.4.0
func FromXMLString ¶ added in v0.4.0
func GetEnvBool ¶ added in v0.2.1
func GetEnvBoolAny ¶ added in v0.6.8
func GetEnvDuration ¶ added in v0.2.5
func HashFNV128UUID ¶ added in v0.3.10
func HashSHA256 ¶
HashSHA256 returns a Base64-encoded string representing the SHA-256 hash of the argument.
func InitAcronyms ¶ added in v0.3.8
func JoinLinesFull ¶ added in v0.6.8
func MapClone ¶ added in v0.6.6
func MapClone[K comparable, V any](m map[K]V) map[K]V
func MapGetOrElse ¶ added in v0.4.8
func MapGetOrElse[K comparable, V any](mp map[K]V, k K, dflt V) V
func MapKeys ¶ added in v0.5.0
func MapKeys[K comparable, V any](m map[K]V) []K
func MapKeysSorted ¶ added in v0.5.0
func MapUpdateKeys ¶ added in v0.6.6
func MapUpdateValues ¶ added in v0.6.6
func MapUpdateValues[K comparable, V any, NV any](m map[K]V, fn func(k K, v V) (NV, error)) (map[K]NV, error)
func MarkdownTable ¶ added in v0.4.0
func MarkdownTableParse ¶ added in v0.4.0
func MicrosToMillis ¶
func MillisToString ¶ added in v0.6.3
func OrDefault ¶ added in v0.4.10
func OrDefault[T comparable](x T, dflt T) T
func ParseArray ¶ added in v0.4.8
func ParseArrayFloat ¶ added in v0.4.8
func ParseArrayInt ¶ added in v0.4.8
func ParseArrayString ¶ added in v0.4.8
func ParseBoolSimple ¶ added in v0.4.40
func ParseFloat ¶ added in v0.4.8
func ParseFloatSimple ¶ added in v0.4.40
func ParseInt16 ¶ added in v0.4.34
func ParseInt16Simple ¶ added in v0.4.40
func ParseInt32 ¶ added in v0.4.34
func ParseInt32Simple ¶ added in v0.4.40
func ParseInt64 ¶ added in v0.4.33
func ParseInt64Simple ¶ added in v0.4.40
func ParseIntSimple ¶ added in v0.4.40
func ParseJSONSimple ¶ added in v0.4.40
func ParseString ¶ added in v0.4.8
func ParseStringSimple ¶ added in v0.4.40
func ParseTimeSimple ¶ added in v0.4.40
func ParseUUIDSimple ¶ added in v0.4.40
func RandomBool ¶
func RandomBool() bool
func RandomBytes ¶
func RandomDate ¶
func RandomElement ¶ added in v0.4.12
func RandomElement[T any](slice []T) T
func RandomElements ¶ added in v0.3.10
func RandomFloat ¶ added in v0.2.9
func RandomIcon ¶ added in v0.4.4
func RandomIcon() string
func RandomInt16 ¶ added in v0.4.34
func RandomInt32 ¶ added in v0.4.34
func RandomInt64 ¶ added in v0.4.33
func RandomString ¶
func ReplaceEnvVars ¶
func RunProcess ¶
func StartProcess ¶ added in v0.2.12
func StringArrayFromAny ¶ added in v0.4.0
func StringArrayMaxLength ¶
func StringArrayOxfordComma ¶
func StringArrayQuoted ¶
func StringCutLast ¶ added in v0.6.6
func StringDetectLinebreak ¶ added in v0.2.12
func StringFilePath ¶ added in v0.5.16
func StringForms ¶
func StringJoin ¶ added in v0.5.15
func StringNullable ¶ added in v0.4.0
func StringPath ¶ added in v0.5.16
func StringPlural ¶
func StringRepeat ¶
func StringReplaceBetween ¶ added in v0.2.12
func StringSplitAndTrim ¶
func StringSplitLastOnly ¶ added in v0.2.12
func StringSplitLines ¶ added in v0.2.12
func StringSplitLinesIndented ¶ added in v0.3.1
func StringSplitPath ¶ added in v0.2.12
func StringSplitPathAndTrim ¶ added in v0.2.12
func StringSubstringBetween ¶ added in v0.2.12
func StringToCamel ¶
func StringToInitials ¶ added in v0.6.0
func StringToKebab ¶ added in v0.5.24
func StringToPlural ¶
func StringToProper ¶ added in v0.5.1
func StringToSingular ¶
func StringToSnake ¶ added in v0.2.5
func StringToTitle ¶
func StringTruncate ¶
func TimeCurrent ¶ added in v0.2.12
func TimeCurrentMillis ¶
func TimeCurrentMillis() int64
func TimeCurrentNanos ¶ added in v0.2.12
func TimeCurrentNanos() int64
func TimeCurrentP ¶ added in v0.2.12
func TimeCurrentUnix ¶ added in v0.2.12
func TimeCurrentUnix() int64
func TimeFromStringSimple ¶ added in v0.3.10
func TimeRelative ¶
func TimeToDateString ¶ added in v0.5.6
func TimeToFull ¶
func TimeToFullMS ¶ added in v0.4.0
func TimeToHTML ¶
func TimeToHours ¶ added in v0.4.0
func TimeToJSFull ¶ added in v0.4.4
func TimeToRFC3339 ¶ added in v0.4.0
func TimeToVerbose ¶ added in v0.2.12
func ToCSVBytes ¶ added in v0.4.0
func ToJSONBytes ¶
func ToJSONCompact ¶
func ToTOMLBytes ¶ added in v0.4.4
func ToXMLCompact ¶ added in v0.4.0
func UUIDFromString ¶
func UUIDFromStringOK ¶ added in v0.2.12
func UUIDString ¶ added in v0.2.12
Types ¶
type DebugInfo ¶
type DebugInfo struct {
ServerTags *OrderedMap[string]
AppTags *OrderedMap[string]
RuntimeTags *OrderedMap[string]
Mods []*debug.Module
}
type Diff ¶
func (Diff) StringVerbose ¶ added in v0.2.11
type Diffs ¶
type Diffs []*Diff
func DiffObjectsIgnoring ¶
func RandomDiffs ¶
func (Diffs) StringVerbose ¶ added in v0.2.11
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,omitzero" 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.3.0
type FieldDesc struct {
Key string `json:"key"`
Title string `json:"title"`
Description string `json:"description,omitzero"`
Type string `json:"type,omitzero"`
Default string `json:"default,omitzero"`
Choices []string `json:"choices,omitempty"`
}
func (*FieldDesc) DefaultBool ¶ added in v0.5.23
func (*FieldDesc) DefaultFloat ¶ added in v0.5.23
func (*FieldDesc) DefaultInt ¶ added in v0.5.23
type FieldDescResults ¶ added in v0.4.19
type FieldDescResults struct {
FieldDescs FieldDescs `json:"fieldDescs"`
Values ValueMap `json:"values"`
Missing []string `json:"missing,omitempty"`
}
func FieldDescsCollect ¶ added in v0.4.19
func FieldDescsCollect(r *http.Request, args FieldDescs) *FieldDescResults
func FieldDescsCollectMap ¶ added in v0.4.36
func FieldDescsCollectMap(m ValueMap, args FieldDescs) *FieldDescResults
func (*FieldDescResults) HasMissing ¶ added in v0.4.19
func (a *FieldDescResults) HasMissing() bool
type FieldDescs ¶ added in v0.3.0
type FieldDescs []*FieldDesc
func (FieldDescs) Get ¶ added in v0.4.4
func (d FieldDescs) Get(key string) *FieldDesc
func (FieldDescs) Keys ¶ added in v0.4.0
func (d FieldDescs) Keys() []string
type HTTPRequest ¶ added in v0.4.10
func NewHTTPGet ¶ added in v0.4.32
func NewHTTPGet(ctx context.Context, url string) *HTTPRequest
func NewHTTPPost ¶ added in v0.4.32
func NewHTTPRequest ¶ added in v0.4.10
func (*HTTPRequest) WithClient ¶ added in v0.4.10
func (r *HTTPRequest) WithClient(c *http.Client) *HTTPRequest
func (*HTTPRequest) WithHeader ¶ added in v0.4.10
func (r *HTTPRequest) WithHeader(k string, v string) *HTTPRequest
type KeyTypeDesc ¶ added in v0.1.42
type KeyTypeDesc struct {
Key string `json:"key"`
Type string `json:"type"`
Description string `json:"description"`
}
func (*KeyTypeDesc) Array ¶ added in v0.1.42
func (k *KeyTypeDesc) Array(key string) []string
func (*KeyTypeDesc) Matches ¶ added in v0.4.4
func (k *KeyTypeDesc) Matches(x *KeyTypeDesc) bool
func (*KeyTypeDesc) String ¶ added in v0.4.24
func (k *KeyTypeDesc) String() string
type KeyTypeDescs ¶ added in v0.1.42
type KeyTypeDescs []*KeyTypeDesc
func (KeyTypeDescs) Array ¶ added in v0.1.42
func (k KeyTypeDescs) Array(key string) [][]string
func (KeyTypeDescs) Sort ¶ added in v0.1.42
func (k KeyTypeDescs) Sort() KeyTypeDescs
func (KeyTypeDescs) Strings ¶ added in v0.4.24
func (k KeyTypeDescs) Strings() []string
type MergeSet ¶ added in v0.5.23
func NewMergeSet ¶ added in v0.5.23
func (*MergeSet[K, T]) MarshalJSON ¶ added in v0.5.23
func (MergeSet[K, T]) MarshalXML ¶ added in v0.5.23
func (*MergeSet[K, T]) MarshalYAML ¶ added in v0.5.23
func (*MergeSet[K, T]) UnmarshalJSON ¶ added in v0.5.23
type NilBool ¶ added in v0.4.0
func (NilBool) MarshalJSON ¶ added in v0.4.0
func (*NilBool) UnmarshalJSON ¶ added in v0.4.0
type NilFloat64 ¶ added in v0.4.0
type NilFloat64 struct {
sql.NullFloat64
}
func (NilFloat64) MarshalJSON ¶ added in v0.4.0
func (n NilFloat64) MarshalJSON() ([]byte, error)
func (*NilFloat64) UnmarshalJSON ¶ added in v0.4.0
func (n *NilFloat64) UnmarshalJSON(data []byte) error
type NilInt32 ¶ added in v0.4.0
func (NilInt32) MarshalJSON ¶ added in v0.4.0
func (*NilInt32) UnmarshalJSON ¶ added in v0.4.0
type NilInt64 ¶ added in v0.4.0
func (NilInt64) MarshalJSON ¶ added in v0.4.0
func (*NilInt64) UnmarshalJSON ¶ added in v0.4.0
type NilJSON ¶ added in v0.4.26
func (NilJSON) MarshalJSON ¶ added in v0.4.26
func (*NilJSON) UnmarshalJSON ¶ added in v0.4.26
type NilString ¶ added in v0.4.0
type NilString struct {
sql.NullString
}
func (NilString) MarshalJSON ¶ added in v0.4.0
func (*NilString) UnmarshalJSON ¶ added in v0.4.0
type NilTime ¶ added in v0.4.0
func (NilTime) MarshalJSON ¶ added in v0.4.0
func (*NilTime) UnmarshalJSON ¶ added in v0.4.0
type Node ¶ added in v0.4.0
type OrderedMap ¶
func FromJSONOrderedMap ¶ added in v0.4.40
func FromJSONOrderedMap[V any](msg []byte) (*OrderedMap[V], error)
func NewOMap ¶ added in v0.4.4
func NewOMap[V any]() *OrderedMap[V]
func NewOrderedMap ¶
func NewOrderedMap[V any](lexical bool, capacity int, pairs ...*OrderedPair[V]) *OrderedMap[V]
func OrderedMapFromMap ¶ added in v0.5.24
func OrderedMapFromMap[V any](m map[string]V, lexical bool) *OrderedMap[V]
func ParseOrderedMap ¶ added in v0.4.40
func ParseOrderedMapSimple ¶ added in v0.4.40
func ParseOrderedMapSimple(r any) *OrderedMap[any]
func (*OrderedMap[V]) Clear ¶ added in v0.4.40
func (o *OrderedMap[V]) Clear()
func (*OrderedMap[V]) Clone ¶ added in v0.4.25
func (o *OrderedMap[V]) Clone() *OrderedMap[V]
func (*OrderedMap[V]) Empty ¶ added in v0.6.6
func (o *OrderedMap[V]) Empty() bool
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 v0.4.4
func (o *OrderedMap[V]) HasKey(k string) bool
func (*OrderedMap[V]) IndexOf ¶ added in v0.4.4
func (o *OrderedMap[V]) IndexOf(k string) int
func (*OrderedMap[V]) Keys ¶ added in v0.6.6
func (o *OrderedMap[V]) Keys() []string
func (*OrderedMap[V]) Length ¶ added in v0.6.6
func (o *OrderedMap[V]) Length() 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]) Merge ¶ added in v0.6.6
func (o *OrderedMap[V]) Merge(defs *OrderedMap[V]) *OrderedMap[V]
func (*OrderedMap[V]) Pairs ¶ added in v0.4.4
func (o *OrderedMap[V]) Pairs() []*OrderedPair[V]
func (*OrderedMap[V]) Remove ¶ added in v0.4.4
func (o *OrderedMap[V]) Remove(k string)
func (*OrderedMap[V]) Set ¶ added in v0.4.4
func (o *OrderedMap[V]) Set(k string, v V)
func (*OrderedMap[V]) SetAll ¶ added in v0.6.6
func (o *OrderedMap[V]) SetAll(m map[string]V)
func (*OrderedMap[V]) ToMap ¶ added in v0.5.24
func (o *OrderedMap[V]) ToMap() ValueMap
func (*OrderedMap[V]) ToOrderedMap ¶ added in v0.5.24
func (o *OrderedMap[V]) ToOrderedMap() *OrderedMap[V]
func (*OrderedMap[V]) ToOrderedMapAny ¶ added in v0.6.6
func (o *OrderedMap[V]) ToOrderedMapAny() *OrderedMap[any]
func (*OrderedMap[V]) UnmarshalJSON ¶
func (o *OrderedMap[V]) UnmarshalJSON(data []byte) error
type OrderedMaps ¶ added in v0.4.37
type OrderedMaps[V any] []*OrderedMap[V]
type OrderedPair ¶ added in v0.4.4
func NewOrderedPair ¶ added in v0.4.37
func NewOrderedPair[V any](k string, v V) *OrderedPair[V]
type OrderedPairs ¶ added in v0.4.37
type OrderedPairs[V any] []*OrderedPair[V]
type Pkg ¶
type Pkg []string
func NewPkgSplit ¶ added in v0.6.6
func (Pkg) StartsWith ¶
func (Pkg) StringWith ¶
type Progress ¶ added in v0.4.8
type Progress struct {
Key string `json:"key,omitzero"`
Total int `json:"total,omitzero"`
Completed int `json:"completed,omitzero"`
// contains filtered or unexported fields
}
func NewProgress ¶ added in v0.4.8
type Set ¶ added in v0.4.27
func (Set[T]) MarshalJSON ¶ added in v0.4.27
func (Set[T]) MarshalXML ¶ added in v0.4.27
func (Set[T]) MarshalYAML ¶ added in v0.4.27
func (*Set[T]) UnmarshalJSON ¶ added in v0.4.27
type Str ¶ added in v0.6.6
type Str string
func (Str) ContainsAny ¶ added in v0.6.6
func (Str) ContainsRune ¶ added in v0.6.6
func (Str) DetectLinebreak ¶ added in v0.6.6
func (Str) ReplaceBetween ¶ added in v0.6.6
func (Str) SplitAndTrim ¶ added in v0.6.6
func (Str) SplitLines ¶ added in v0.6.6
func (Str) SplitLinesIndented ¶ added in v0.6.6
func (Str) SplitPathAndTrim ¶ added in v0.6.6
func (Str) SubstringBetween ¶ added in v0.6.6
func (Str) TrimPrefix ¶ added in v0.6.6
func (Str) TrimSuffix ¶ added in v0.6.6
func (Str) WithPrefix ¶ added in v0.6.6
func (Str) WithStrings ¶ added in v0.6.6
func (Str) WithSuffix ¶ added in v0.6.6
type StringSlice ¶ added in v0.4.0
type StringSlice struct {
Slice []string
}
func NewStringSlice ¶ added in v0.4.0
func NewStringSlice(a ...string) *StringSlice
func NewStringSliceWithSize ¶ added in v0.6.6
func NewStringSliceWithSize(size int) *StringSlice
func (*StringSlice) Empty ¶ added in v0.4.0
func (s *StringSlice) Empty() bool
func (*StringSlice) Join ¶ added in v0.4.0
func (s *StringSlice) Join(x string) string
func (*StringSlice) JoinCommas ¶ added in v0.6.6
func (s *StringSlice) JoinCommas() string
func (*StringSlice) JoinSimple ¶ added in v0.6.6
func (s *StringSlice) JoinSimple() string
func (*StringSlice) JoinSpace ¶ added in v0.6.6
func (s *StringSlice) JoinSpace() string
func (*StringSlice) Length ¶ added in v0.6.6
func (s *StringSlice) Length() int
func (*StringSlice) MarshalJSON ¶ added in v0.6.6
func (s *StringSlice) MarshalJSON() ([]byte, error)
func (*StringSlice) Push ¶ added in v0.4.0
func (s *StringSlice) Push(strs ...string)
func (*StringSlice) PushUnique ¶ added in v0.5.22
func (s *StringSlice) PushUnique(strs ...string)
func (*StringSlice) Pushf ¶ added in v0.4.0
func (s *StringSlice) Pushf(msg string, args ...any)
func (*StringSlice) PushfUnlessNil ¶ added in v0.6.1
func (s *StringSlice) PushfUnlessNil(msg string, args ...any)
func (*StringSlice) SliceSafe ¶ added in v0.6.0
func (s *StringSlice) SliceSafe() []string
func (*StringSlice) Sort ¶ added in v0.4.0
func (s *StringSlice) Sort()
func (*StringSlice) String ¶ added in v0.4.4
func (s *StringSlice) String() string
func (*StringSlice) TotalLength ¶ added in v0.5.22
func (s *StringSlice) TotalLength() int
func (*StringSlice) UnmarshalJSON ¶ added in v0.6.6
func (s *StringSlice) UnmarshalJSON(data []byte) error
type Strings ¶ added in v0.6.6
type Strings []Str
func (Strings) WithPrefix ¶ added in v0.6.6
func (Strings) WithSuffix ¶ added in v0.6.6
type Timer ¶ added in v0.1.43
func TimerStart ¶
func TimerStart() *Timer
type ToOrderedMap ¶ added in v0.4.37
type ToOrderedMap[T any] interface { ToOrderedMap() *OrderedMap[T] }
type ToOrderedMapAny ¶ added in v0.6.6
type ToOrderedMapAny interface {
ToOrderedMapAny() *OrderedMap[any]
}
type ToOrderedMaps ¶ added in v0.4.37
type ToOrderedMaps[T any] interface { ToOrderedMaps() OrderedMaps[T] }
type Tree ¶ added in v0.4.0
type ValueMap ¶
func FromJSONMap ¶ added in v0.2.27
func FromTOMLMap ¶ added in v0.4.4
func FromXMLMap ¶ added in v0.4.0
func ParseArrayMap ¶ added in v0.4.8
func ParseMapSimple ¶ added in v0.4.40
func RandomValueMap ¶
func ValueMapFor ¶
func ValueMapFrom ¶ added in v0.4.33
func ValueMapFromAny ¶ added in v0.5.24
func ValueMapFromAnyOK ¶ added in v0.5.24
func (ValueMap) GetArrayOpt ¶ added in v0.3.9
func (ValueMap) GetArrayOr ¶ added in v0.5.23
func (ValueMap) GetBoolOpt ¶ added in v0.2.4
func (ValueMap) GetFloatArray ¶ added in v0.3.9
func (ValueMap) GetFloatArrayOpt ¶ added in v0.5.23
func (ValueMap) GetFloatArrayOr ¶ added in v0.5.23
func (ValueMap) GetFloatOpt ¶ added in v0.3.9
func (ValueMap) GetFloatOr ¶ added in v0.5.23
func (ValueMap) GetInt64Opt ¶ added in v0.5.23
func (ValueMap) GetInt64Or ¶ added in v0.5.23
func (ValueMap) GetIntArray ¶ added in v0.3.9
func (ValueMap) GetIntArrayOpt ¶ added in v0.5.23
func (ValueMap) GetIntArrayOr ¶ added in v0.5.23
func (ValueMap) GetMapArray ¶ added in v0.3.9
func (ValueMap) GetMapArrayOpt ¶ added in v0.5.23
func (ValueMap) GetMapArrayOr ¶ added in v0.5.23
func (ValueMap) GetRichString ¶ added in v0.6.6
func (ValueMap) GetRichStringOpt ¶ added in v0.6.6
func (ValueMap) GetStringArray ¶
func (ValueMap) GetStringArrayOpt ¶ added in v0.3.9
func (ValueMap) GetStringArrayOr ¶ added in v0.5.23
func (ValueMap) GetStringOpt ¶
func (ValueMap) GetStringOr ¶ added in v0.4.41
func (ValueMap) GetStringPtr ¶ added in v0.2.12
func (ValueMap) KeysAndValues ¶
func (ValueMap) MarshalXML ¶
func (ValueMap) ParseArray ¶
func (ValueMap) ParseArrayFloat ¶ added in v0.3.9
func (ValueMap) ParseArrayInt ¶ added in v0.2.5
func (ValueMap) ParseArrayMap ¶ added in v0.3.9
func (ValueMap) ParseArrayString ¶ added in v0.2.5
func (ValueMap) ParseFloat ¶
func (ValueMap) ParseInt16 ¶ added in v0.4.34
func (ValueMap) ParseInt32 ¶ added in v0.4.34
func (ValueMap) ParseInt64 ¶ added in v0.4.33
func (ValueMap) ParseString ¶
func (ValueMap) ReplaceEnvVars ¶ added in v0.5.20
func (ValueMap) ToOrderedMap ¶ added in v0.5.24
func (m ValueMap) ToOrderedMap() *OrderedMap[any]
func (ValueMap) ToQueryString ¶
func (ValueMap) ToStringMap ¶ added in v0.2.20
func (ValueMap) WithoutKeys ¶ added in v0.4.1
Source Files
¶
- acronym.go
- array.go
- async.go
- bool.go
- byte.go
- casing.go
- cast.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
- mergeset.go
- nil.go
- numeric.go
- parse.go
- parsearray.go
- pkg.go
- plural.go
- process.go
- progress.go
- random.go
- richstring.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.