pkg

package
v2.0.0-alpha56 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 11 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

Index

Constants

This section is empty.

Variables

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

Functions

func GenerateRandomID

func GenerateRandomID() int

Generate unique random id

func IsTime

func IsTime(stringDate string) bool

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

func MakeCurlCommand

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

func ParseHTTPRequest

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

func ParseHTTPResponse

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

func SimulateHttp

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

Jump to

Keyboard shortcuts

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