Documentation ¶
Index ¶
- Constants
- type AnyTypeInterceptor
- type ArrayContent
- type BinaryContent
- type BoolContent
- type Buffer
- type Complex128Content
- type Complex64Content
- type Content
- 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[T int | int8 | int16 | int32 | int64](val T) Content
- func NewJSONContent(val []byte) Content
- func NewNilContent() Content
- func NewStringContent(val string) Content
- func NewStringerContent[T fmt.Stringer](val T) Content
- func NewTimeContent(val time.Time) Content
- func NewUintContent[T uint | uint8 | uint16 | uint32 | uint64](val T) Content
- func NewUintptrContent(val uintptr) Content
- type ErrorContent
- type Field
- 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[T int | int8 | int16 | int32 | int64](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[T int | int8 | int16 | int32 | int64](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[T fmt.Stringer](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[T uint | uint8 | uint16 | uint32 | uint64](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[T uint | uint8 | uint16 | uint32 | uint64](key string, nums []T) Field
- type Fields
- type Float32Content
- type Float64Content
- type IntContent
- type JSONContent
- type NilContent
- type StringContent
- type StringerContent
- type TimeContent
- type Type
- type UintContent
- type UintptrContent
Constants ¶
View Source
const ( TypeNull = iota TypeBool TypeInt TypeUint TypeUintptr TypeFloat TypeComplex TypeString TypeStringer TypeBinary TypeTime TypeError TypeJSON TypeAny TypeArray = 0x80 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyTypeInterceptor ¶
type ArrayContent ¶
type ArrayContent struct {
// contains filtered or unexported fields
}
func (ArrayContent) Data ¶
func (f ArrayContent) Data() any
func (ArrayContent) EncodeJSON ¶
func (f ArrayContent) EncodeJSON(buffer Buffer) (err error)
func (ArrayContent) Raw ¶
func (f ArrayContent) Raw() []Content
func (ArrayContent) Type ¶
func (f ArrayContent) Type() Type
type BinaryContent ¶
type BinaryContent struct {
// contains filtered or unexported fields
}
func (BinaryContent) Data ¶
func (f BinaryContent) Data() any
func (BinaryContent) EncodeJSON ¶
func (f BinaryContent) EncodeJSON(buffer Buffer) (err error)
func (BinaryContent) Raw ¶
func (f BinaryContent) Raw() json.RawMessage
func (BinaryContent) String ¶
func (f BinaryContent) String() string
func (BinaryContent) Type ¶
func (f BinaryContent) Type() Type
type BoolContent ¶
type BoolContent bool
func (BoolContent) Data ¶
func (f BoolContent) Data() any
func (BoolContent) EncodeJSON ¶
func (f BoolContent) EncodeJSON(buffer Buffer) error
func (BoolContent) Raw ¶
func (f BoolContent) Raw() bool
func (BoolContent) Type ¶
func (f BoolContent) Type() Type
type Complex128Content ¶
type Complex128Content complex128
func (Complex128Content) Data ¶
func (f Complex128Content) Data() any
func (Complex128Content) EncodeJSON ¶
func (f Complex128Content) EncodeJSON(buffer Buffer) (err error)
func (Complex128Content) Raw ¶
func (f Complex128Content) Raw() complex128
func (Complex128Content) Type ¶
func (f Complex128Content) Type() Type
type Complex64Content ¶
type Complex64Content complex64
func (Complex64Content) Data ¶
func (f Complex64Content) Data() any
func (Complex64Content) EncodeJSON ¶
func (f Complex64Content) EncodeJSON(buffer Buffer) (err error)
func (Complex64Content) Raw ¶
func (f Complex64Content) Raw() complex64
func (Complex64Content) Type ¶
func (f Complex64Content) Type() Type
type Content ¶
func NewBinaryContent ¶
func NewBoolField ¶
func NewByteStringContent ¶
func NewComplex128Content ¶
func NewComplex128Content(val complex128) Content
func NewComplex64Content ¶
func NewErrorContent ¶
func NewFloat32Content ¶
func NewFloat64Content ¶
func NewJSONContent ¶
func NewNilContent ¶
func NewNilContent() Content
func NewStringContent ¶
func NewStringerContent ¶
func NewTimeContent ¶
func NewUintptrContent ¶
type ErrorContent ¶
type ErrorContent struct {
// contains filtered or unexported fields
}
func (ErrorContent) Data ¶
func (f ErrorContent) Data() any
func (ErrorContent) EncodeJSON ¶
func (f ErrorContent) EncodeJSON(buffer Buffer) error
func (ErrorContent) Raw ¶
func (f ErrorContent) Raw() error
func (ErrorContent) Type ¶
func (f ErrorContent) Type() Type
type Field ¶
func ByteString ¶
func ByteStrings ¶
func Complex128 ¶
func Complex128(key string, val complex128) Field
func Complex128s ¶
func Complex128s(key string, nums []complex128) Field
func Complex64s ¶
func JsonRawMessage ¶
func JsonRawMessage(key string, val json.RawMessage) Field
func (Field) EncodeJSON ¶
func (Field) MarshalJSON ¶
type Float32Content ¶
type Float32Content float32
func (Float32Content) Data ¶
func (f Float32Content) Data() any
func (Float32Content) EncodeJSON ¶
func (f Float32Content) EncodeJSON(buffer Buffer) (err error)
func (Float32Content) Raw ¶
func (f Float32Content) Raw() float32
func (Float32Content) Type ¶
func (f Float32Content) Type() Type
type Float64Content ¶
type Float64Content float64
func (Float64Content) Data ¶
func (f Float64Content) Data() any
func (Float64Content) EncodeJSON ¶
func (f Float64Content) EncodeJSON(buffer Buffer) (err error)
func (Float64Content) Raw ¶
func (f Float64Content) Raw() float64
func (Float64Content) Type ¶
func (f Float64Content) Type() Type
type IntContent ¶
type IntContent[T int | int8 | int16 | int32 | int64] struct { // contains filtered or unexported fields }
func (IntContent[T]) Data ¶
func (f IntContent[T]) Data() any
func (IntContent[T]) EncodeJSON ¶
func (f IntContent[T]) EncodeJSON(buffer Buffer) (err error)
func (IntContent[T]) Raw ¶
func (f IntContent[T]) Raw() T
func (IntContent[T]) Type ¶
func (f IntContent[T]) Type() Type
type JSONContent ¶
type JSONContent struct {
// contains filtered or unexported fields
}
func (JSONContent) Data ¶
func (f JSONContent) Data() any
func (JSONContent) EncodeJSON ¶
func (f JSONContent) EncodeJSON(buffer Buffer) (err error)
func (JSONContent) Raw ¶
func (f JSONContent) Raw() json.RawMessage
func (JSONContent) Type ¶
func (f JSONContent) Type() Type
type NilContent ¶
type NilContent struct{}
func (NilContent) Data ¶
func (n NilContent) Data() any
func (NilContent) EncodeJSON ¶
func (n NilContent) EncodeJSON(buffer Buffer) error
func (NilContent) Type ¶
func (n NilContent) Type() Type
type StringContent ¶
type StringContent string
func (StringContent) Data ¶
func (f StringContent) Data() any
func (StringContent) EncodeJSON ¶
func (f StringContent) EncodeJSON(buffer Buffer) error
func (StringContent) Raw ¶
func (f StringContent) Raw() string
func (StringContent) Type ¶
func (f StringContent) Type() Type
type StringerContent ¶
type StringerContent struct {
// contains filtered or unexported fields
}
func (StringerContent) Data ¶
func (f StringerContent) Data() any
func (StringerContent) EncodeJSON ¶
func (f StringerContent) EncodeJSON(buffer Buffer) (err error)
func (StringerContent) Raw ¶
func (f StringerContent) Raw() fmt.Stringer
func (StringerContent) Type ¶
func (f StringerContent) Type() Type
type TimeContent ¶
func (TimeContent) Data ¶
func (f TimeContent) Data() any
func (TimeContent) EncodeJSON ¶
func (f TimeContent) EncodeJSON(buffer Buffer) error
func (TimeContent) Raw ¶
func (f TimeContent) Raw() time.Time
func (TimeContent) Type ¶
func (f TimeContent) Type() Type
type UintContent ¶
type UintContent[T uint | uint8 | uint16 | uint32 | uint64] struct { // contains filtered or unexported fields }
func (UintContent[T]) Data ¶
func (f UintContent[T]) Data() any
func (UintContent[T]) EncodeJSON ¶
func (f UintContent[T]) EncodeJSON(buffer Buffer) (err error)
func (UintContent[T]) Raw ¶
func (f UintContent[T]) Raw() T
func (UintContent[T]) Type ¶
func (f UintContent[T]) Type() Type
type UintptrContent ¶
type UintptrContent uintptr
func (UintptrContent) Data ¶
func (f UintptrContent) Data() any
func (UintptrContent) EncodeJSON ¶
func (f UintptrContent) EncodeJSON(buffer Buffer) (err error)
func (UintptrContent) Raw ¶
func (f UintptrContent) Raw() uintptr
func (UintptrContent) Type ¶
func (f UintptrContent) Type() Type
Click to show internal directories.
Click to hide internal directories.