pkg

package
v2.1.0-alpha25 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 14 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 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 NewID

func NewID(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.

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/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
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.

Jump to

Keyboard shortcuts

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