sendpacket

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePacket

func EncodePacket(w io.Writer, bbp *SendPacket) error

func JsonEncodePacket

func JsonEncodePacket(w io.Writer, bbp *SendPacket) error

Types

type Decoder

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

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) DecodePacket

func (d *Decoder) DecodePacket(bbp *SendPacket) error

type SendPacket

type SendPacket struct {
	Datetime     int64  `json:"time"` // unix time
	ConnectionID uint32 `json:"id,omitempty"`
	User         string `json:"user,omitempty"`
	Db           string `json:"db,omitempty"`
	Addr         string `json:"addr,omitempty"`
	State        string `json:"state,omitempty"`   // 5
	Err          string `json:"err,omitempty"`     // 6
	Packets      []byte `json:"packets,omitempty"` // 7
	Cmd          string `json:"cmd,omitempty"`
}

Jump to

Keyboard shortcuts

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