Versions in this module Expand all Collapse all v0 v0.0.1 Oct 16, 2023 Changes in this version + const TypeAny + const TypeArray + const TypeBinary + const TypeBool + const TypeComplex + const TypeError + const TypeFloat + const TypeInt + const TypeJSON + const TypeNull + const TypeString + const TypeStringer + const TypeTime + const TypeUint + const TypeUintptr + type AnyTypeInterceptor interface + Handle func(reflectedType reflect.Type, val any) (Content, bool) + Priority func() uint + type ArrayContent struct + func (f ArrayContent) Data() any + func (f ArrayContent) EncodeJSON(buffer Buffer) (err error) + func (f ArrayContent) Raw() []Content + func (f ArrayContent) Type() Type + type BinaryContent struct + func (f BinaryContent) Data() any + func (f BinaryContent) EncodeJSON(buffer Buffer) (err error) + func (f BinaryContent) Raw() json.RawMessage + func (f BinaryContent) String() string + func (f BinaryContent) Type() Type + type BoolContent bool + func (f BoolContent) Data() any + func (f BoolContent) EncodeJSON(buffer Buffer) error + func (f BoolContent) Raw() bool + func (f BoolContent) Type() Type + type Buffer interface + Write func(p []byte) (n int, err error) + WriteByte func(c byte) error + WriteRune func(r rune) (n int, err error) + WriteString func(s string) (n int, err error) + type Complex128Content complex128 + func (f Complex128Content) Data() any + func (f Complex128Content) EncodeJSON(buffer Buffer) (err error) + func (f Complex128Content) Raw() complex128 + func (f Complex128Content) Type() Type + type Complex64Content complex64 + func (f Complex64Content) Data() any + func (f Complex64Content) EncodeJSON(buffer Buffer) (err error) + func (f Complex64Content) Raw() complex64 + func (f Complex64Content) Type() Type + type Content interface + Data func() any + EncodeJSON func(buffer Buffer) error + Type func() Type + func NewBinaryContent(val []byte) Content + func NewBoolField(val bool) Content + func NewByteStringContent(val []byte) Content + func NewComplex128Content(val complex128) Content + func NewComplex64Content(val complex64) Content + func NewErrorContent(val error) Content + func NewFloat32Content(val float32) Content + func NewFloat64Content(val float64) Content + func NewIntContent(val T) Content + func NewJSONContent(val []byte) Content + func NewNilContent() Content + func NewStringContent(val string) Content + func NewStringerContent(val T) Content + func NewTimeContent(val time.Time) Content + func NewUintContent(val T) Content + func NewUintptrContent(val uintptr) Content + type ErrorContent struct + func (f ErrorContent) Data() any + func (f ErrorContent) EncodeJSON(buffer Buffer) error + func (f ErrorContent) Raw() error + func (f ErrorContent) Type() Type + type Field struct + Key string + func Any(key string, val any) Field + func Binary(key string, val []byte) Field + func Binarys(key string, valArr [][]byte) Field + func Bool(key string, val bool) Field + func Bools(key string, valArr []bool) Field + func ByteString(key string, val []byte) Field + func ByteStrings(key string, valArr [][]byte) Field + func Complex128(key string, val complex128) Field + func Complex128s(key string, nums []complex128) Field + func Complex64(key string, val complex64) Field + func Complex64s(key string, nums []complex64) Field + func Duration(key string, val time.Duration) Field + func Durations(key string, valArr []time.Duration) Field + func Error(key string, err error) Field + func Errors(key string, errs []error) Field + func Float32(key string, val float32) Field + func Float32s(key string, nums []float32) Field + func Float64(key string, val float64) Field + func Float64s(key string, nums []float64) Field + func Int(key string, val T) Field + func Int16(key string, val int16) Field + func Int16s(key string, nums []int16) Field + func Int32(key string, val int32) Field + func Int32s(key string, nums []int32) Field + func Int64(key string, val int64) Field + func Int64s(key string, nums []int64) Field + func Int8(key string, val int8) Field + func Int8s(key string, nums []int8) Field + func Ints(key string, nums []T) Field + func JsonRawMessage(key string, val json.RawMessage) Field + func Nil(key string) Field + func String(key string, val string) Field + func Stringer(key string, val fmt.Stringer) Field + func Stringers(key string, valArr []T) Field + func Strings(key string, valArr []string) Field + func Time(key string, val time.Time) Field + func Times(key string, valArr []time.Time) Field + func Uint(key string, val T) Field + func Uint16(key string, val uint16) Field + func Uint16s(key string, nums []uint16) Field + func Uint32(key string, val uint32) Field + func Uint32s(key string, nums []uint32) Field + func Uint64(key string, val uint64) Field + func Uint64s(key string, nums []uint64) Field + func Uint8(key string, val uint8) Field + func Uint8s(key string, nums []uint8) Field + func Uintptr(key string, val uintptr) Field + func Uintptrs(key string, us []uintptr) Field + func Uints(key string, nums []T) Field + func (f Field) EncodeJSON(buffer Buffer) (err error) + func (f Field) MarshalJSON() (_ []byte, err error) + type Fields []Field + func (f Fields) EncodeJSON(buf Buffer) (err error) + func (f Fields) Export() map[string]any + func (f Fields) Get(key string) (Field, bool) + func (f Fields) Has(key string) bool + func (f Fields) MarshalJSON() (dst []byte, err error) + func (f Fields) Unique() []Field + type Float32Content float32 + func (f Float32Content) Data() any + func (f Float32Content) EncodeJSON(buffer Buffer) (err error) + func (f Float32Content) Raw() float32 + func (f Float32Content) Type() Type + type Float64Content float64 + func (f Float64Content) Data() any + func (f Float64Content) EncodeJSON(buffer Buffer) (err error) + func (f Float64Content) Raw() float64 + func (f Float64Content) Type() Type + type IntContent struct + func (f IntContent[T]) Data() any + func (f IntContent[T]) EncodeJSON(buffer Buffer) (err error) + func (f IntContent[T]) Raw() T + func (f IntContent[T]) Type() Type + type JSONContent struct + func (f JSONContent) Data() any + func (f JSONContent) EncodeJSON(buffer Buffer) (err error) + func (f JSONContent) Raw() json.RawMessage + func (f JSONContent) Type() Type + type NilContent struct + func (n NilContent) Data() any + func (n NilContent) EncodeJSON(buffer Buffer) error + func (n NilContent) Type() Type + type StringContent string + func (f StringContent) Data() any + func (f StringContent) EncodeJSON(buffer Buffer) error + func (f StringContent) Raw() string + func (f StringContent) Type() Type + type StringerContent struct + func (f StringerContent) Data() any + func (f StringerContent) EncodeJSON(buffer Buffer) (err error) + func (f StringerContent) Raw() fmt.Stringer + func (f StringerContent) Type() Type + type TimeContent time.Time + func (f TimeContent) Data() any + func (f TimeContent) EncodeJSON(buffer Buffer) error + func (f TimeContent) Raw() time.Time + func (f TimeContent) Type() Type + type Type uint8 + type UintContent struct + func (f UintContent[T]) Data() any + func (f UintContent[T]) EncodeJSON(buffer Buffer) (err error) + func (f UintContent[T]) Raw() T + func (f UintContent[T]) Type() Type + type UintptrContent uintptr + func (f UintptrContent) Data() any + func (f UintptrContent) EncodeJSON(buffer Buffer) (err error) + func (f UintptrContent) Raw() uintptr + func (f UintptrContent) Type() Type