template

package
v1.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

README

Template Common Plugin

This plugin provides wrapper over event that is good for using in Golang templates.

TEvent methods:

  • RoutingKey() string
  • Id() string
  • Timestamp() time.Time
  • Errors() []string - returns event errors
  • GetLabel(key string) string - returns empty string if an event has no label associated with key
  • GetField(path string) any - returns nil if an event has no field on passed path

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TEvent

type TEvent struct {
	// contains filtered or unexported fields
}

func New

func New(e *core.Event) TEvent

func (TEvent) Errors

func (te TEvent) Errors() []string

func (TEvent) GetField

func (te TEvent) GetField(key string) any

func (TEvent) GetLabel

func (te TEvent) GetLabel(key string) string

func (TEvent) Id

func (te TEvent) Id() string

func (TEvent) RoutingKey

func (te TEvent) RoutingKey() string

func (TEvent) Timestamp

func (te TEvent) Timestamp() time.Time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL