Documentation ¶
Overview ¶
Package eventtype defines a custom format for event types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EventFormat = gen.CustomFormat[ Event, JSONEventEncoding, TextEventEncoding, ]()
EventFormat defines a custom format for Event.
Functions ¶
This section is empty.
Types ¶
type JSONEventEncoding ¶
type JSONEventEncoding struct{}
JSONEventEncoding defines a custom JSON encoding for hexadecimal numbers.
func (JSONEventEncoding) DecodeJSON ¶
func (JSONEventEncoding) DecodeJSON(d *jx.Decoder) (v Event, _ error)
DecodeJSON decodes a hexadecimal number from a JSON string.
func (JSONEventEncoding) EncodeJSON ¶
func (JSONEventEncoding) EncodeJSON(e *jx.Encoder, v Event)
EncodeJSON encodes a hexadecimal number as a JSON string.
type TextEventEncoding ¶
type TextEventEncoding struct{}
TextEventEncoding defines a custom text encoding for hexadecimal numbers.
func (TextEventEncoding) DecodeText ¶
func (TextEventEncoding) DecodeText(s string) (v Event, _ error)
DecodeText decodes a hexadecimal number from a string.
func (TextEventEncoding) EncodeText ¶
func (TextEventEncoding) EncodeText(v Event) string
EncodeText encodes a hexadecimal number as a string.
Click to show internal directories.
Click to hide internal directories.