pkg

package
v2.2.0-alpha19 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 16 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 integration with MySQL outgoing.
Package mysql provides integration with MySQL outgoing.
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 graph provides the resolver implementation for the GraphQL schema.
Package graph provides the resolver implementation for the GraphQL schema.
Package models provides data models for the keploy.
Package models provides data models for the keploy.
platform
docker
Package docker provides functionality for working with Docker containers.
Package docker provides functionality for working with Docker containers.
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
Package configdb provides functionality for working with keploy configuration databases.
Package configdb provides functionality for working with keploy configuration databases.
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.
service
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