Documentation
¶
Overview ¶
Package gotext implements the generator for generic logs.
Configuration file supports including timestamps in log messages
generator: type: gotext include_timestamp: true
Index ¶
- Constants
- Variables
- func New(cfg *ucfg.Config) (generator.Generator, error)
- func Percent(numerator, denominator any) string
- func PlusInt(a, b any) string
- func RandomDuration() string
- func RandomIPv4() string
- func RandomInt(maximum int) string
- func RandomPort() string
- func TimesInt(a, b any) string
- func TimestampFormatter(format, whence string) string
- func ToInt(input any) int
- type Field
- type GcField
- type GeneratorConfig
- type GoText
- type Template
Constants ¶
View Source
const Name = "gotext"
Name is the name of the generator in the configuration file and registry
Variables ¶
View Source
var ( FunctionMap = template.FuncMap{ "ToLower": strings.ToLower, "ToUpper": strings.ToUpper, "TimestampFormatter": TimestampFormatter, "RandomIPv4": RandomIPv4, "RandomPort": RandomPort, "RandomInt": RandomInt, "Percent": Percent, "PlusInt": PlusInt, "TimesInt": TimesInt, } )
Functions ¶
func RandomDuration ¶
func RandomDuration() string
func RandomIPv4 ¶
func RandomIPv4() string
func RandomPort ¶
func RandomPort() string
func TimestampFormatter ¶
Types ¶
type GeneratorConfig ¶
Click to show internal directories.
Click to hide internal directories.