func Marshal(v interface{}) ([]byte, error) {
	x := &bytes.Buffer{}
	err := NewEncoder(x, math.MaxUint16).Encode(v)
	return x.Bytes(), err
}
Marshal is used to marshal an object to the bolt interface encoded bytes
package encoding
import (
	"encoding/binary"
	"io"
	"math"
	"reflect"
	"bytes"
	"github.com/johnnadratowski/golang-neo4j-bolt-driver/errors"
	"github.com/johnnadratowski/golang-neo4j-bolt-driver/structures"
)
const (
	NilMarker = 0xC0
	TrueMarker = 0xC3
	FalseMarker = 0xC2
	Int8Marker = 0xC8
	Int16Marker = 0xC9
	Int32Marker = 0xCA
	Int64Marker = 0xCB
	FloatMarker = 0xC1
	TinyStringMarker = 0x80
	String8Marker = 0xD0
	String16Marker = 0xD1
	String32Marker = 0xD2
	TinySliceMarker = 0x90
	Slice8Marker = 0xD4
	Slice16Marker = 0xD5
	Slice32Marker = 0xD6
	TinyMapMarker = 0xA0
	Map8Marker = 0xD8
	Map16Marker = 0xD9
	Map32Marker = 0xDA
	TinyStructMarker = 0xB0
	Struct8Marker = 0xDC
	Struct16Marker = 0xDD
)
var (
	EndMessage = []byte{byte(0x00), byte(0x00)}
)
type Encoder struct {
	w         io.Writer
	buf       *bytes.Buffer
	chunkSize uint16
}
func NewEncoder(w io.Writer, chunkSize uint16) Encoder {
	return Encoder{
		w:         w,
		buf:       &bytes.Buffer{},
		chunkSize: chunkSize,
	}
}