cbruno@M1P reallyfreegeoip % cat pipelines/get_ip_geolocation.fp
pipeline "get_ip_geolocation" {
title = "Get IP Geolocation"
description = "Get geolocation data for an IPv4 or IPv6 address."
documentation = file("./pipelines/docs/get_ip_geolocation.md")
param "ip_address" {
type = string
description = "The IPv4 or IPv6 address."
}
param "format" {
type = string
optional = true
default = "json"
description = "The format of the output. Accepted values are json, csv and xml. Defaults to json."
}
step "http" "get_ip_geolocation" {
method = "get"
url = "https://reallyfreegeoip.org/${param.format}/${param.ip_address}"
}
output "geolocation" {
description = "IP geolocation details."
value = step.http.get_ip_geolocation.response_body
}
}
That points to an MD file:
cbruno@M1P reallyfreegeoip % cat pipelines/docs/get_ip_geolocation.md
## Get IP Geolocation
Get geolocation data for an IPv4 or IPv6 address.
### Notes
An IP address must be passed to the pipeline.
I get an error when trying to run Flowpipe:
cbruno@M1P reallyfreegeoip % fp pipeline list
Error: Failed to decode mod:
Unable to parse documentation attribute
(/Users/cbruno/flowpipe/reallyfreegeoip/pipelines/get_ip_geolocation.fp:5,3-42)
For a given pipeline:
That points to an MD file:
I get an error when trying to run Flowpipe: