dumper

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
)

func (Direction) String

func (d Direction) String() string

type DumpValue

type DumpValue struct {
	Key   string
	Value interface{}
}

DumpValue ...

type DumpValues

type DumpValues struct {
	Values []DumpValue
}

DumpValues ...

type Dumper

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

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, persistent *DumpValues, 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) Read added in v0.4.0

func (h *HexDumper) Read(in []byte) []DumpValue

Read return byte to analyzed string

func (*HexDumper) ReadPersistentValues added in v0.4.0

func (h *HexDumper) ReadPersistentValues(in []byte) []DumpValue

ReadPersistentValues return persistent value each session

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, persistent *DumpValues, 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) Read added in v0.4.0

func (m *MysqlDumper) Read(in []byte) []DumpValue

Read return byte to analyzed string

func (*MysqlDumper) ReadPersistentValues added in v0.4.0

func (m *MysqlDumper) ReadPersistentValues(in []byte) []DumpValue

ReadPersistentValues return persistent value each session

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, persistent *DumpValues, 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) Read added in v0.4.0

func (p *PgDumper) Read(in []byte) []DumpValue

Read return byte to analyzed string

func (*PgDumper) ReadPersistentValues added in v0.4.0

func (p *PgDumper) ReadPersistentValues(in []byte) []DumpValue

ReadPersistentValues return persistent value each session

Jump to

Keyboard shortcuts

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