Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Ericsson/jaq
/ functions
Functions
27 in github.com/Ericsson/jaq
⨍
Functions
27
◇
Types & classes
2
↓ 13 callers
Function
httpCommand
httpCommand is a generator of *cobra.Commands which only differ by their HTTP verbs.
cmd/httpVerb.go:61
↓ 5 callers
Function
copyNewline
copyNewline does an io.Copy but follows it up by adding a newline so that output from muliple commands will not be on the same line. It adds the given
cmd/httpVerb.go:281
↓ 2 callers
Function
ResetSettingsHTTPVerbs
()
cmd/httpVerb.go:319
↓ 2 callers
Function
addFlags
addFlags allows you to reinitialize flags/viper/cobra.
cmd/root.go:131
↓ 2 callers
Function
initConfig
initConfig reads in config file and ENV variables if set.
cmd/root.go:172
↓ 2 callers
Function
truncatedValue
truncatedValue is showing just part of the value in case its a huge binary or web page.
transform/transform.go:199
↓ 1 callers
Function
InputToCommands
InputToCommands reads from the given io.Reader (e.g. os.Stdin) and uses the data there to replace values like $1.uuid in the args. It returns a [][]st
transform/transform.go:36
↓ 1 callers
Function
ResetSettings
()
cmd/root.go:115
↓ 1 callers
Function
captureOutput
captureOutput runs the given function and returns stdout and stderr as strings and the error returned from the function. The function given expects an
cmd/httpVerb_test.go:380
↓ 1 callers
Function
dataLookup
dataLookup generates closures which lookup transformation values ($1.uuid) and returns their values based on the data passed to the generator.
transform/transform.go:145
↓ 1 callers
Function
execute
execute handles parsing the input and translating that into sets of commands that then get run in series.
cmd/root.go:76
↓ 1 callers
Function
getURL
(scheme, subdomain, domain string)
cmd/httpVerb.go:333
↓ 1 callers
Function
httpRun
httpRun is the shared logic of all the HTTP commands but has configuration and input transformation logic extracted.
cmd/httpVerb.go:86
↓ 1 callers
Function
jsonQuery
jsonQuery queries the given data for the value of the field specified by the given query. If there is an error parsing the json or the field does not
transform/transform.go:188
↓ 1 callers
Function
newConfig
(cmd *cobra.Command)
cmd/httpVerb.go:343
↓ 1 callers
Function
newRequest
newRequest creates an *http.Request from the configuration.
cmd/httpVerb.go:211
↓ 1 callers
Function
parseTransform
parseTransform takes a string expected to be a substitution variable (e.g. $1.uuid) and splits it into its position and json query parts.
transform/transform.go:164
↓ 1 callers
Function
processResponse
(conf config, resp *http.Response)
cmd/httpVerb.go:100
↓ 1 callers
Function
readData
readData reads all data from the given reader and splits it into a [][]string: a slice of commands, each command having multiple positional arguments.
transform/transform.go:61
↓ 1 callers
Function
response
response runs the request with the given configuration. The request is not modified. If trace/debug are set the request/responses are logged. If dryru
cmd/httpVerb.go:144
↓ 1 callers
Function
transform
transform uses the data to transform the argument (e.g. foo $1.uuid -> foo uuid)
transform/transform.go:139
Function
Execute
Execute is called by main.main(). It only needs to happen once.
cmd/root.go:60
Function
TestHTTPVerbs
(t *testing.T)
cmd/httpVerb_test.go:36
Function
TestInputToCommands
(t *testing.T)
transform/transform_test.go:29
Function
TestTruncatedValue
(t *testing.T)
transform/transform_test.go:167
Function
init
()
cmd/httpVerb.go:315
Function
main
()
main.go:19