integrations

package
v2.2.0-alpha14 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 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 integration with MySQL outgoing.
Package mysql provides integration with MySQL outgoing.
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