Documentation ¶
Index ¶
- Constants
- type CollectDataRowsStep
- type Frontend
- type RowData
- type Script
- type Step
- func ExpectAnyMessage(want pgproto3.BackendMessage) Step
- func ExpectMessage(want pgproto3.BackendMessage) Step
- func NewAuthStep(ctx context.Context, tlsConfig *tls.Config, ...) Step
- func NewFlushStep() Step
- func SendMessage(msg pgproto3.FrontendMessage) Step
- func WaitForStep(msg pgproto3.BackendMessage) Step
Constants ¶
const ( SSLRequestOk = 'S' SSLRequestNo = 'N' )
Valid responses on SSLRequest
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectDataRowsStep ¶
type CollectDataRowsStep struct {
// contains filtered or unexported fields
}
CollectDataRowsStep used to receive and store rows from the database DataRow response
func NewCollectDataRowsStep ¶
func NewCollectDataRowsStep(count int) *CollectDataRowsStep
NewCollectDataRowsStep creates step that collects <count> DataRow packet's values and export them
func (*CollectDataRowsStep) GetRows ¶
func (step *CollectDataRowsStep) GetRows() []RowData
GetRows returns collected rows
func (*CollectDataRowsStep) Step ¶
func (step *CollectDataRowsStep) Step(frontend *Frontend) error
Step receive and store DataRow packets count times
type Frontend ¶
Frontend extends pgproto3.Frontend
func NewFrontend ¶
NewFrontend returns new Frontend
func (*Frontend) ReadSSLResponse ¶
ReadSSLResponse reads and returns response on SSLRequest
type Step ¶
Step execute one step of flow
func ExpectAnyMessage ¶
func ExpectAnyMessage(want pgproto3.BackendMessage) Step
ExpectAnyMessage creates step to receive one packet and compare only the type with "want"s type
func ExpectMessage ¶
func ExpectMessage(want pgproto3.BackendMessage) Step
ExpectMessage creates step to receive one packet and verify that it deeply equals to "want" message
func NewAuthStep ¶
func NewAuthStep(ctx context.Context, tlsConfig *tls.Config, database, username, password string) Step
NewAuthStep returns step to send Startup message and process authentication with password md5 authentication
func NewFlushStep ¶
func NewFlushStep() Step
NewFlushStep returns step that flushes frontend's buffer and sends collected packets to the connection
func SendMessage ¶
func SendMessage(msg pgproto3.FrontendMessage) Step
SendMessage sends message to the frontend's buffer but not flushes. It will be sent only on buffer overload or FlushStep
func WaitForStep ¶
func WaitForStep(msg pgproto3.BackendMessage) Step
WaitForStep creates step that skips all messages from the frontend until gets message with msg's type