Documentation ¶
Overview ¶
Package v1 provides functionality for decoding Postgres requests and responses.
Index ¶
- Constants
- func IsValuePresent(connectionid string, value string) bool
- func LaevensteinDistance(str1, str2 string) bool
- func NewPostgresV1(logger *zap.Logger) integrations.Integrations
- func PreparedStatementMatch(mock *models.Mock, actualPgReq *models.Backend, logger *zap.Logger, ...) (bool, []string, error)
- type BackendWrapper
- type FrontendWrapper
- type PostgresV1
- func (p *PostgresV1) MatchType(_ context.Context, reqBuf []byte) bool
- func (p *PostgresV1) MockOutgoing(ctx context.Context, src net.Conn, dstCfg *integrations.ConditionalDstCfg, ...) error
- func (p *PostgresV1) RecordOutgoing(ctx context.Context, src net.Conn, dst net.Conn, mocks chan<- *models.Mock, ...) error
- type PrepMap
- type QueryData
- type TestPrepMap
Constants ¶
View Source
const ( AuthTypeOk = 0 AuthTypeCleartextPassword = 3 AuthTypeMD5Password = 5 AuthTypeSCMCreds = 6 AuthTypeGSS = 7 AuthTypeGSSCont = 8 AuthTypeSSPI = 9 AuthTypeSASL = 10 AuthTypeSASLContinue = 11 AuthTypeSASLFinal = 12 )
constants for the authentication message types
View Source
const ProtocolVersionNumber uint32 = 196608
ProtocolVersionNumber Replace with actual version number if different
Variables ¶
This section is empty.
Functions ¶
func IsValuePresent ¶
func LaevensteinDistance ¶
func NewPostgresV1 ¶
func NewPostgresV1(logger *zap.Logger) integrations.Integrations
Types ¶
type BackendWrapper ¶
func NewBackend ¶
func NewBackend() *BackendWrapper
type FrontendWrapper ¶
func NewFrontend ¶
func NewFrontend() *FrontendWrapper
type PostgresV1 ¶
type PostgresV1 struct {
// contains filtered or unexported fields
}
func (*PostgresV1) MatchType ¶
func (p *PostgresV1) MatchType(_ context.Context, reqBuf []byte) bool
MatchType determines if the outgoing network call is Postgres by comparing the message format with that of a Postgres text message.
func (*PostgresV1) MockOutgoing ¶
func (p *PostgresV1) MockOutgoing(ctx context.Context, src net.Conn, dstCfg *integrations.ConditionalDstCfg, mockDb integrations.MockMemDb, opts models.OutgoingOptions) error
func (*PostgresV1) RecordOutgoing ¶
type TestPrepMap ¶
Click to show internal directories.
Click to hide internal directories.