Documentation ¶
Index ¶
- func Diff(data1, data2 []byte) ([]byte, error)
- func NewSafeTemplate(templateName string) *template.Template
- func PreProcessModRuleGoTemplate(template string) string
- type NamePool
- type TLogger
- type TestLogger
- func (TestLogger) Enabled() bool
- func (log TestLogger) Error(err error, msg string, args ...interface{})
- func (TestLogger) Info(_ string, _ ...interface{})
- func (log TestLogger) V(v int) logr.InfoLogger
- func (log TestLogger) WithName(_ string) logr.Logger
- func (log TestLogger) WithValues(_ ...interface{}) logr.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSafeTemplate ¶ added in v0.11.0
NewTemplate returns an instance of a Go template wired up with the Sprig template functions.
func PreProcessModRuleGoTemplate ¶ added in v0.7.0
PreProcessModRuleGoTemplate converts special tokens such as .#0 to .I0 which are actual properties on the ModRule golang template context.
Types ¶
type NamePool ¶
type NamePool struct {
// contains filtered or unexported fields
}
NamePool - represents a pool of randomly generated strings.
func NewNamePool ¶
NewNamePool - return a newly instantiated NamePool
func (*NamePool) GetNextName ¶
GetNextName returns the next randomly generated name.
func (*NamePool) ResetIndex ¶
func (np *NamePool) ResetIndex()
ResetIndex resets the internal incremental index.
type TLogger ¶
type TLogger interface { Logf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) }
TLogger is an interface which implements Logf, Errorf, and Fatalf.
type TestLogger ¶
type TestLogger struct {
TLogger TLogger
}
TestLogger is a logr.Logger that prints through a testing.T object. Only error logs will have any effect.
func (TestLogger) Error ¶
func (log TestLogger) Error(err error, msg string, args ...interface{})
Error prints an error.
func (TestLogger) WithName ¶
func (log TestLogger) WithName(_ string) logr.Logger
WithName returns this log.
func (TestLogger) WithValues ¶
func (log TestLogger) WithValues(_ ...interface{}) logr.Logger
WithValues returns this log.