pkg

package
v2.3.0-beta9 Latest Latest
Warning

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

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

README

PKG Documentation

This package comprises interface methods and Go structs, which can be utilized by external applications. It's employed to execute logic and store data for the CLI commands.

Documentation

Overview

Package pkg provides utility functions for Keploy.

Index

Constants

This section is empty.

Variables

View Source
var Emoji = "\U0001F430" + " Keploy:"

Functions

func ExtractHostAndPort

func ExtractHostAndPort(curlCmd string) (string, string, error)

func IsTime

func IsTime(stringDate string) bool

IsTime verifies whether a given string represents a valid date or not.

func LastID

func LastID(IDs []string, identifier string) string

func MakeCurlCommand

func MakeCurlCommand(method string, url string, header map[string]string, body string) string

func NextID

func NextID(IDs []string, identifier string) string

func ParseHTTPRequest

func ParseHTTPRequest(requestBytes []byte) (*http.Request, error)

func ParseHTTPResponse

func ParseHTTPResponse(data []byte, request *http.Request) (*http.Response, error)

func ReadSessionIndices

func ReadSessionIndices(path string, Logger *zap.Logger) ([]string, error)

func SimulateHTTP

func SimulateHTTP(ctx context.Context, tc *models.TestCase, testSet string, logger *zap.Logger, apiTimeout uint64) (*models.HTTPResp, error)

func ToHTTPHeader

func ToHTTPHeader(mockHeader map[string]string) http.Header

func ToYamlHTTPHeader

func ToYamlHTTPHeader(httpHeader http.Header) map[string]string

ToYamlHTTPHeader converts the http header into yaml format

func URLParams

func URLParams(r *http.Request) map[string]string

URLParams returns the Url and Query parameters from the request url.

func WaitForPort

func WaitForPort(ctx context.Context, host string, port string, timeout time.Duration) error

Types

This section is empty.

Directories

Path Synopsis
Package core provides functionality for managing core functionalities in Keploy.
Package core provides functionality for managing core functionalities in Keploy.
app
Package app provides functionality for managing applications.
Package app provides functionality for managing applications.
hooks
Package hooks provides functionality for managing hooks.
Package hooks provides functionality for managing hooks.
hooks/conn
Package conn provides functionality for handling connections.
Package conn provides functionality for handling connections.
hooks/structs
Package structs provides data structures for hooks.
Package structs provides data structures for hooks.
proxy
Package proxy provides functionality for handling proxies.
Package proxy provides functionality for handling proxies.
proxy/integrations
Package integrations provides functionality for integrating different types of services.
Package integrations provides functionality for integrating different types of services.
proxy/integrations/generic
Package generic provides functionality for decoding generic dependencies.
Package generic provides functionality for decoding generic dependencies.
proxy/integrations/grpc
Package grpc provides functionality for integrating with gRPC outgoing calls.
Package grpc provides functionality for integrating with gRPC outgoing calls.
proxy/integrations/http
Package http provides functionality for handling HTTP outgoing calls.
Package http provides functionality for handling HTTP outgoing calls.
proxy/integrations/mongo
Package mongo provides functionality for working with MongoDB outgoing calls.
Package mongo provides functionality for working with MongoDB outgoing calls.
proxy/integrations/mysql
Package mysql provides the MySQL integration.
Package mysql provides the MySQL integration.
proxy/integrations/mysql/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.
proxy/integrations/mysql/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.
proxy/integrations/mysql/utils
Package utils provides utility functions for MySQL packets
Package utils provides utility functions for MySQL packets
proxy/integrations/mysql/wire
Package wire provides encoding and decoding operation of MySQL packets.
Package wire provides encoding and decoding operation of MySQL packets.
proxy/integrations/mysql/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.
proxy/integrations/mysql/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
proxy/integrations/mysql/wire/phase/query
Package query provides functions to decode MySQL command phase packets.
Package query provides functions to decode MySQL command phase packets.
proxy/integrations/mysql/wire/phase/query/preparedstmt
Package preparedstmt provides functionality for decoding prepared statement packets.
Package preparedstmt provides functionality for decoding prepared statement packets.
proxy/integrations/mysql/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.
proxy/integrations/mysql/wire/phase/query/utility
Package utility provides encoding and decoding of utility command packets.
Package utility provides encoding and decoding of utility command packets.
proxy/integrations/postgres/v1
Package v1 provides functionality for decoding Postgres requests and responses.
Package v1 provides functionality for decoding Postgres requests and responses.
proxy/integrations/redis
Package redis is the decode point for the redis application.
Package redis is the decode point for the redis application.
proxy/integrations/scram
Package scram provides functionality for SCRAM authentication.
Package scram provides functionality for SCRAM authentication.
proxy/integrations/util
Package util provides utility functions for the integration package.
Package util provides utility functions for the integration package.
proxy/util
Package util provides utility functions for the proxy package.
Package util provides utility functions for the proxy package.
tester
Package tester provides functionality for testing keploy with itself
Package tester provides functionality for testing keploy with itself
Package models provides data models for the keploy.
Package models provides data models for the keploy.
mysql
Package mysql in models provides realted structs for mysql protocol
Package mysql in models provides realted structs for mysql protocol
platform
auth
Package auth defines methods for authenticating with GitHub.
Package auth defines methods for authenticating with GitHub.
coverage
Package coverage defines the interface for coverage services.
Package coverage defines the interface for coverage services.
coverage/golang
Package golang implements the methods for golang coverage services.
Package golang implements the methods for golang coverage services.
coverage/java
Package java implements the methods for java coverage services.
Package java implements the methods for java coverage services.
coverage/javascript
Package javascript implements the methods for javascript coverage services.
Package javascript implements the methods for javascript coverage services.
coverage/python
Package python implements the methods for python coverage services.
Package python implements the methods for python coverage services.
docker
Package docker provides functionality for working with Docker containers.
Package docker provides functionality for working with Docker containers.
storage
Package storage defines methods for storage DB.
Package storage defines methods for storage DB.
telemetry
Package telemetry provides functionality for telemetry data collection.
Package telemetry provides functionality for telemetry data collection.
yaml
Package yaml provides utility functions for working with YAML files.
Package yaml provides utility functions for working with YAML files.
yaml/configdb/testset
Package testset provides functionality for working with keploy testset level configs like templates, post/pre script.
Package testset provides functionality for working with keploy testset level configs like templates, post/pre script.
yaml/configdb/user
Package user provides functionality for working with keploy user configs like installation id.
Package user provides functionality for working with keploy user configs like installation id.
yaml/mockdb
Package mockdb provides a mock database implementation.
Package mockdb provides a mock database implementation.
yaml/reportdb
Package reportdb provides functionality for managing test reports in a database.
Package reportdb provides functionality for managing test reports in a database.
yaml/testdb
Package testdb provides functionality for working with test databases.
Package testdb provides functionality for working with test databases.
Package service provides the service interface for the service package.
Package service provides the service interface for the service package.
orchestrator
Package orchestrator acts as a main brain for both the record and replay services
Package orchestrator acts as a main brain for both the record and replay services
record
Package record provides functionality for recording and managing test cases and mocks.
Package record provides functionality for recording and managing test cases and mocks.
replay
Package replay provides functions for replaying requests and comparing responses.
Package replay provides functions for replaying requests and comparing responses.
tools
Package tools provides utility functions for the service package.
Package tools provides utility functions for the service package.
utgen
Package utgen is a service that generates unit tests for a given source code file.
Package utgen is a service that generates unit tests for a given source code file.
utgen/assets
Package settings provides prompt settings for the test generation
Package settings provides prompt settings for the test generation

Jump to

Keyboard shortcuts

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