MCPcopy Create free account

hub / github.com/Ericsson/jaq / functions

Functions27 in github.com/Ericsson/jaq

↓ 13 callersFunctionhttpCommand
httpCommand is a generator of *cobra.Commands which only differ by their HTTP verbs.
cmd/httpVerb.go:61
↓ 5 callersFunctioncopyNewline
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 callersFunctionResetSettingsHTTPVerbs
()
cmd/httpVerb.go:319
↓ 2 callersFunctionaddFlags
addFlags allows you to reinitialize flags/viper/cobra.
cmd/root.go:131
↓ 2 callersFunctioninitConfig
initConfig reads in config file and ENV variables if set.
cmd/root.go:172
↓ 2 callersFunctiontruncatedValue
truncatedValue is showing just part of the value in case its a huge binary or web page.
transform/transform.go:199
↓ 1 callersFunctionInputToCommands
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 callersFunctionResetSettings
()
cmd/root.go:115
↓ 1 callersFunctioncaptureOutput
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 callersFunctiondataLookup
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 callersFunctionexecute
execute handles parsing the input and translating that into sets of commands that then get run in series.
cmd/root.go:76
↓ 1 callersFunctiongetURL
(scheme, subdomain, domain string)
cmd/httpVerb.go:333
↓ 1 callersFunctionhttpRun
httpRun is the shared logic of all the HTTP commands but has configuration and input transformation logic extracted.
cmd/httpVerb.go:86
↓ 1 callersFunctionjsonQuery
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 callersFunctionnewConfig
(cmd *cobra.Command)
cmd/httpVerb.go:343
↓ 1 callersFunctionnewRequest
newRequest creates an *http.Request from the configuration.
cmd/httpVerb.go:211
↓ 1 callersFunctionparseTransform
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 callersFunctionprocessResponse
(conf config, resp *http.Response)
cmd/httpVerb.go:100
↓ 1 callersFunctionreadData
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 callersFunctionresponse
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 callersFunctiontransform
transform uses the data to transform the argument (e.g. foo $1.uuid -> foo uuid)
transform/transform.go:139
FunctionExecute
Execute is called by main.main(). It only needs to happen once.
cmd/root.go:60
FunctionTestHTTPVerbs
(t *testing.T)
cmd/httpVerb_test.go:36
FunctionTestInputToCommands
(t *testing.T)
transform/transform_test.go:29
FunctionTestTruncatedValue
(t *testing.T)
transform/transform_test.go:167
Functioninit
()
cmd/httpVerb.go:315
Functionmain
()
main.go:19