Documentation ¶
Overview ¶
Package encoder houses zap's shared internal buffer pool. Third-party packages can recreate the same functionality with buffers.NewPool.
Package encoder copy from zapcore.jsonEncoder
Index ¶
- Variables
- func NewCustomerEncoder(cfg zapcore.EncoderConfig) zapcore.Encoder
- type CustomerEncoder
- func (enc CustomerEncoder) AddArray(key string, arr zapcore.ArrayMarshaler) error
- func (enc CustomerEncoder) AddBinary(key string, val []byte)
- func (enc CustomerEncoder) AddBool(key string, val bool)
- func (enc CustomerEncoder) AddByteString(key string, val []byte)
- func (enc CustomerEncoder) AddComplex128(key string, val complex128)
- func (enc CustomerEncoder) AddComplex64(k string, v complex64)
- func (enc CustomerEncoder) AddDuration(key string, val time.Duration)
- func (enc CustomerEncoder) AddFloat32(key string, val float32)
- func (enc CustomerEncoder) AddFloat64(key string, val float64)
- func (enc CustomerEncoder) AddInt(k string, v int)
- func (enc CustomerEncoder) AddInt16(k string, v int16)
- func (enc CustomerEncoder) AddInt32(k string, v int32)
- func (enc CustomerEncoder) AddInt64(key string, val int64)
- func (enc CustomerEncoder) AddInt8(k string, v int8)
- func (enc CustomerEncoder) AddObject(key string, obj zapcore.ObjectMarshaler) error
- func (enc CustomerEncoder) AddReflected(key string, obj interface{}) error
- func (enc CustomerEncoder) AddString(key, val string)
- func (enc CustomerEncoder) AddTime(key string, val time.Time)
- func (enc CustomerEncoder) AddUint(k string, v uint)
- func (enc CustomerEncoder) AddUint16(k string, v uint16)
- func (enc CustomerEncoder) AddUint32(k string, v uint32)
- func (enc CustomerEncoder) AddUint64(key string, val uint64)
- func (enc CustomerEncoder) AddUint8(k string, v uint8)
- func (enc CustomerEncoder) AddUintptr(k string, v uintptr)
- func (enc CustomerEncoder) AppendArray(arr zapcore.ArrayMarshaler) error
- func (enc CustomerEncoder) AppendBool(val bool)
- func (enc CustomerEncoder) AppendByteString(val []byte)
- func (enc CustomerEncoder) AppendComplex128(val complex128)
- func (enc CustomerEncoder) AppendComplex64(v complex64)
- func (enc CustomerEncoder) AppendDuration(val time.Duration)
- func (enc CustomerEncoder) AppendFloat32(v float32)
- func (enc CustomerEncoder) AppendFloat64(v float64)
- func (enc CustomerEncoder) AppendInt(v int)
- func (enc CustomerEncoder) AppendInt16(v int16)
- func (enc CustomerEncoder) AppendInt32(v int32)
- func (enc CustomerEncoder) AppendInt64(val int64)
- func (enc CustomerEncoder) AppendInt8(v int8)
- func (enc CustomerEncoder) AppendObject(obj zapcore.ObjectMarshaler) error
- func (enc CustomerEncoder) AppendReflected(val interface{}) error
- func (enc CustomerEncoder) AppendString(val string)
- func (enc CustomerEncoder) AppendTime(val time.Time)
- func (enc CustomerEncoder) AppendUint(v uint)
- func (enc CustomerEncoder) AppendUint16(v uint16)
- func (enc CustomerEncoder) AppendUint32(v uint32)
- func (enc CustomerEncoder) AppendUint64(val uint64)
- func (enc CustomerEncoder) AppendUint8(v uint8)
- func (enc CustomerEncoder) AppendUintptr(v uintptr)
- func (enc *CustomerEncoder) Clone() zapcore.Encoder
- func (enc *CustomerEncoder) EncodeEntry(ent zapcore.Entry, fields []zap.Field) (*buffer.Buffer, error)
- func (enc CustomerEncoder) OpenNamespace(key string)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Get retrieves a buffer from the pool, creating one if necessary.
Get = _pool.Get
)
Functions ¶
func NewCustomerEncoder ¶
func NewCustomerEncoder(cfg zapcore.EncoderConfig) zapcore.Encoder
Types ¶
type CustomerEncoder ¶
type CustomerEncoder struct {
// contains filtered or unexported fields
}
func (CustomerEncoder) AddArray ¶
func (enc CustomerEncoder) AddArray(key string, arr zapcore.ArrayMarshaler) error
func (CustomerEncoder) AddByteString ¶
func (CustomerEncoder) AddComplex128 ¶
func (enc CustomerEncoder) AddComplex128(key string, val complex128)
func (CustomerEncoder) AddComplex64 ¶
func (CustomerEncoder) AddDuration ¶
func (CustomerEncoder) AddObject ¶
func (enc CustomerEncoder) AddObject(key string, obj zapcore.ObjectMarshaler) error
func (CustomerEncoder) AddReflected ¶
func (CustomerEncoder) AppendArray ¶
func (enc CustomerEncoder) AppendArray(arr zapcore.ArrayMarshaler) error
func (CustomerEncoder) AppendComplex128 ¶
func (enc CustomerEncoder) AppendComplex128(val complex128)
func (CustomerEncoder) AppendDuration ¶
func (CustomerEncoder) AppendObject ¶
func (enc CustomerEncoder) AppendObject(obj zapcore.ObjectMarshaler) error
func (CustomerEncoder) AppendReflected ¶
func (enc CustomerEncoder) AppendReflected(val interface{}) error
func (*CustomerEncoder) Clone ¶
func (enc *CustomerEncoder) Clone() zapcore.Encoder
func (*CustomerEncoder) EncodeEntry ¶
Click to show internal directories.
Click to hide internal directories.