mock

package
v1.0.98 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestingMarshalizers = map[string]marshal.Marshalizer{
	"json":  &JsonMarshalizer{},
	"proto": &ProtobufMarshalizer{},
}

TestingMarshalizers -

Functions

This section is empty.

Types

type FormatterStub

type FormatterStub struct {
	OutputCalled func(line logger.LogLineHandler) []byte
}

FormatterStub -

func (*FormatterStub) IsInterfaceNil

func (fs *FormatterStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*FormatterStub) Output

func (fs *FormatterStub) Output(line logger.LogLineHandler) []byte

Output -

type JsonMarshalizer

type JsonMarshalizer struct{}

JsonMarshalizer -

func (*JsonMarshalizer) IsInterfaceNil

func (j *JsonMarshalizer) IsInterfaceNil() bool

IsInterfaceNil -

func (JsonMarshalizer) Marshal

func (j JsonMarshalizer) Marshal(obj interface{}) ([]byte, error)

Marshal -

func (JsonMarshalizer) Unmarshal

func (j JsonMarshalizer) Unmarshal(obj interface{}, buff []byte) error

Unmarshal -

type MarshalizerStub

type MarshalizerStub struct {
	MarshalCalled   func(obj interface{}) ([]byte, error)
	UnmarshalCalled func(obj interface{}, buff []byte) error
}

MarshalizerStub -

func (*MarshalizerStub) IsInterfaceNil

func (ms *MarshalizerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*MarshalizerStub) Marshal

func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)

Marshal -

func (*MarshalizerStub) Unmarshal

func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error

Unmarshal -

type ProtobufMarshalizer

type ProtobufMarshalizer struct{}

ProtobufMarshalizer -

func (*ProtobufMarshalizer) IsInterfaceNil

func (x *ProtobufMarshalizer) IsInterfaceNil() bool

IsInterfaceNil -

func (*ProtobufMarshalizer) Marshal

func (x *ProtobufMarshalizer) Marshal(obj interface{}) ([]byte, error)

Marshal -

func (*ProtobufMarshalizer) Unmarshal

func (x *ProtobufMarshalizer) Unmarshal(obj interface{}, buff []byte) error

Unmarshal -

type WriterStub

type WriterStub struct {
	WriteCalled func(p []byte) (n int, err error)
}

WriterStub -

func (*WriterStub) Write

func (ws *WriterStub) Write(p []byte) (n int, err error)

Write -

Jump to

Keyboard shortcuts

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