package
0.0.0-20250227233008-6305ea83e4e1
Repository: https://github.com/bhatti/api-mock-service.git
Documentation: pkg.go.dev
# Functions
ConvertEnvironmentToAPIVariables converts a PostmanEnvironment to APIVariables.
ConvertPostmanToScenarios builds scenarios from Postman contents.
ConvertScenariosToPostman builds Postman contents.
CreateAuth creates a new PostmanAuth struct with the given parameters.
CreateAuthParam creates a new PostmanAuthParam of type string.
CreateCollection returns a new PostmanCollection.
CreatePostmanEvent creates a new PostmanEvent of type text/javascript.
CreatePostmanItem is a helper to create a new PostmanItem.
CreatePostmanItemGroup is a helper to create a new PostmanItemGroup.
CreatePostmanVariable creates a new PostmanVariable of type string.
LoadAndConvertPostmanEnvironment loads a Postman environment file and converts it to APIVariables.
NewPostmanContext creates a new context.
NewPostmanConverter creates a new converter instance.
NewScriptConverter creates a new script converter that's backward compatible with ScriptProcessor.
ParseCollection parses the content of the provided data stream into a PostmanCollection object.
ParseEnvironment parses a Postman environment file into a PostmanEnvironment struct.
ProcessURLPath processes and normalizes URL paths This is a simpler version of the function you already have.
UnmarshalURLJSON parses the JSON-encoded data and create an PostmanURL from it.
# Constants
These constants represent the available raw languages.
These constants represent the available raw languages.
These constants represent the available raw languages.
PreRequest script is usually executed before the HTTP request is sent.
Test script is usually executed after the actual HTTP request is sent, and the response is received.
These constants represent the available raw languages.
These constants represent the available raw languages.
# Structs
PostmanAuth contains the authentication method used and its associated parameters.
PostmanAuthParam represents an attribute for any authentication method provided by Postman.
PostmanCollection represents a Postman PostmanCollection.
PostmanCollectionDescription contains collection description.
PostmanContext stores additional Postman configuration.
PostmanConverter converter.
PostmanCookie represents a cookie that follows the Google Chrome format (https://developer.chrome.com/extensions/cookies).
PostmanEnvironment represents the structure of a Postman environment file.
PostmanEnvVariable represents a variable in a Postman environment.
An PostmanEvent defines a script associated with an associated event name.
PostmanHeader represents an HTTP PostmanHeader.
PostmanHeaderList contains a list of headers.
PostmanInfo stores data about the collection.
An PostmanItem is an entity which contain an actual HTTP request, and sample responses attached to it.
A PostmanItemGroup is an ordered set of requests.
PostmanItems are the basic unit for a Postman collection.
PostmanQueryParam param for query.
A PostmanRequest represents an HTTP request.
PostmanRequestBody represents the data usually contained in the request body.
PostmanRequestBodyOptions holds body options.
PostmanRequestBodyOptionsRaw represents the acutal language to use in postman.
A PostmanResponse represents an HTTP response.
A PostmanScript is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.
PostmanSettings contains execution configuration.
PostmanURL is a struct that contains an PostmanURL in a "broken-down way".
A PostmanVariable allows you to store and reuse values in your requests and scripts.
ScriptConverter converts Postman scripts to API scenario format.
# Type aliases
ListenType defines the kind of script attached to an event.