dumper

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnMetadata added in v0.7.0

type ConnMetadata struct {
	DumpValues []DumpValue
	Internal   interface{} // internal metadata for dumper
}

ConnMetadata is metadada per TCP connection

type Direction

type Direction int

Direction of TCP commnication

const (
	// ClientToRemote is client->proxy->remote
	ClientToRemote Direction = iota
	// RemoteToClient is client<-proxy<-remote
	RemoteToClient
	// SrcToDst is src->dst
	SrcToDst
	// DstToSrc is dst->src
	DstToSrc
	// Unknown direction
	Unknown Direction = 9
)

func (Direction) String

func (d Direction) String() string

type DumpValue

type DumpValue struct {
	Key   string
	Value interface{}
}

DumpValue ...

type Dumper

type Dumper interface {
	Name() string
	Dump(in []byte, direction Direction, connMetadata *ConnMetadata, additional []DumpValue) error
	Read(in []byte, direction Direction, connMetadata *ConnMetadata) []DumpValue
	Log(values []DumpValue)
	NewConnMetadata() *ConnMetadata
}

Dumper interface

type HexDumper

type HexDumper struct {
	// contains filtered or unexported fields
}

HexDumper ...

func NewHexDumper

func NewHexDumper() *HexDumper

NewHexDumper returns a HexDumper

func (*HexDumper) Dump

func (h *HexDumper) Dump(in []byte, direction Direction, connMetadata *ConnMetadata, additional []DumpValue) error

Dump TCP

func (*HexDumper) Log added in v0.4.0

func (h *HexDumper) Log(values []DumpValue)

Log values

func (*HexDumper) Name added in v0.4.0

func (h *HexDumper) Name() string

Name return dumper name

func (*HexDumper) NewConnMetadata added in v0.7.0

func (h *HexDumper) NewConnMetadata() *ConnMetadata

NewConnMetadata ...

func (*HexDumper) Read added in v0.4.0

func (h *HexDumper) Read(in []byte, direction Direction, connMetadata *ConnMetadata) []DumpValue

Read return byte to analyzed string

type MysqlDumper

type MysqlDumper struct {
	// contains filtered or unexported fields
}

MysqlDumper struct

func NewMysqlDumper

func NewMysqlDumper() *MysqlDumper

NewMysqlDumper returns a MysqlDumper

func (*MysqlDumper) Dump

func (m *MysqlDumper) Dump(in []byte, direction Direction, connMetadata *ConnMetadata, additional []DumpValue) error

Dump query of MySQL

func (*MysqlDumper) Log added in v0.4.0

func (m *MysqlDumper) Log(values []DumpValue)

Log values

func (*MysqlDumper) Name added in v0.4.0

func (m *MysqlDumper) Name() string

Name return dumper name

func (*MysqlDumper) NewConnMetadata added in v0.7.0

func (m *MysqlDumper) NewConnMetadata() *ConnMetadata

NewConnMetadata return metadata per TCP connection

func (*MysqlDumper) Read added in v0.4.0

func (m *MysqlDumper) Read(in []byte, direction Direction, connMetadata *ConnMetadata) []DumpValue

Read return byte to analyzed string

type PgDumper

type PgDumper struct {
	// contains filtered or unexported fields
}

PgDumper struct

func NewPgDumper

func NewPgDumper() *PgDumper

NewPgDumper returns a PgDumper

func (*PgDumper) Dump

func (p *PgDumper) Dump(in []byte, direction Direction, connMetadata *ConnMetadata, additional []DumpValue) error

Dump query of PostgreSQL

func (*PgDumper) Log added in v0.4.0

func (p *PgDumper) Log(values []DumpValue)

Log values

func (*PgDumper) Name added in v0.4.0

func (p *PgDumper) Name() string

Name return dumper name

func (*PgDumper) NewConnMetadata added in v0.7.0

func (p *PgDumper) NewConnMetadata() *ConnMetadata

NewConnMetadata ...

func (*PgDumper) Read added in v0.4.0

func (p *PgDumper) Read(in []byte, direction Direction, connMetadata *ConnMetadata) []DumpValue

Read return byte to analyzed string

Jump to

Keyboard shortcuts

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