integrations

package
v2.2.0-alpha32 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Integrations Package Documentation

This package includes modules that are used for parsing different protocols.

Documentation

Overview

Package integrations provides functionality for integrating different types of services.

Index

Constants

View Source
const (
	HTTP        integrationType = "http"
	GRPC        integrationType = "grpc"
	GENERIC     integrationType = "generic"
	MYSQL       integrationType = "mysql"
	POSTGRES_V1 integrationType = "postgres_v1"
	POSTGRES_V2 integrationType = "postgres_v2"
	MONGO       integrationType = "mongo"
	REDIS       integrationType = "redis"
)

constants for different types of integrations

Variables

View Source
var Registered = make(map[string]Initializer)

Functions

func Register

func Register(name string, i Initializer)

Types

type ConditionalDstCfg

type ConditionalDstCfg struct {
	Addr   string // Destination Addr (ip:port)
	Port   uint
	TLSCfg *tls.Config
}

type Initializer

type Initializer func(logger *zap.Logger) Integrations

type Integrations

type Integrations interface {
	MatchType(ctx context.Context, reqBuf []byte) bool
	RecordOutgoing(ctx context.Context, src net.Conn, dst net.Conn, mocks chan<- *models.Mock, opts models.OutgoingOptions) error
	MockOutgoing(ctx context.Context, src net.Conn, dstCfg *ConditionalDstCfg, mockDb MockMemDb, opts models.OutgoingOptions) error
}

type MockMemDb

type MockMemDb interface {
	GetFilteredMocks() ([]*models.Mock, error)
	GetUnFilteredMocks() ([]*models.Mock, error)
	UpdateUnFilteredMock(old *models.Mock, new *models.Mock) bool
	DeleteFilteredMock(mock models.Mock) bool
	DeleteUnFilteredMock(mock models.Mock) bool
	// Flag the mock as used which matches the external request from application in test mode
	FlagMockAsUsed(mock models.Mock) error
}

Directories

Path Synopsis
Package generic provides functionality for decoding generic dependencies.
Package generic provides functionality for decoding generic dependencies.
Package grpc provides functionality for integrating with gRPC outgoing calls.
Package grpc provides functionality for integrating with gRPC outgoing calls.
Package http provides functionality for handling HTTP outgoing calls.
Package http provides functionality for handling HTTP outgoing calls.
Package mongo provides functionality for working with MongoDB outgoing calls.
Package mongo provides functionality for working with MongoDB outgoing calls.
Package mysql provides the MySQL integration.
Package mysql provides the MySQL integration.
recorder
Package recorder is used to record the MySQL traffic between the client and the server.
Package recorder is used to record the MySQL traffic between the client and the server.
replayer
Package replayer is used to mock the MySQL traffic between the client and the server.
Package replayer is used to mock the MySQL traffic between the client and the server.
utils
Package utils provides utility functions for MySQL packets
Package utils provides utility functions for MySQL packets
wire
Package wire provides encoding and decoding operation of MySQL packets.
Package wire provides encoding and decoding operation of MySQL packets.
wire/phase
Package phase contains the encoding and decoding functions for the different phases of the MySQL protocol.
Package phase contains the encoding and decoding functions for the different phases of the MySQL protocol.
wire/phase/conn
Package conn provides decoding and encoding of connection phase mysql packets
Package conn provides decoding and encoding of connection phase mysql packets
wire/phase/query
Package query provides functions to decode MySQL command phase packets.
Package query provides functions to decode MySQL command phase packets.
wire/phase/query/preparedstmt
Package preparedstmt provides functionality for decoding prepared statement packets.
Package preparedstmt provides functionality for decoding prepared statement packets.
wire/phase/query/rowscols
Package rowscols provides encoding and decoding of MySQL row & column packets.
Package rowscols provides encoding and decoding of MySQL row & column packets.
wire/phase/query/utility
Package utility provides encoding and decoding of utility command packets.
Package utility provides encoding and decoding of utility command packets.
postgres
v1
Package v1 provides functionality for decoding Postgres requests and responses.
Package v1 provides functionality for decoding Postgres requests and responses.
Package redis is the decode point for the redis application.
Package redis is the decode point for the redis application.
Package scram provides functionality for SCRAM authentication.
Package scram provides functionality for SCRAM authentication.
Package util provides utility functions for the integration package.
Package util provides utility functions for the integration package.

Jump to

Keyboard shortcuts

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