-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
267: Add http json functionality #293
Conversation
469266f
to
60e0d66
Compare
Signed-off-by: Paul Grant <paulfgrant01@gmail.com>
60e0d66
to
d772c10
Compare
@paulfgrant01 please fix lint issue. |
…ck json server to run testing against Signed-off-by: Paul Grant <pgrant@williamhill.us>
471abeb
to
bbfdac5
Compare
pkg/providers/httpjson/httpjson.go
Outdated
"strconv" | ||
"strings" | ||
|
||
// nolint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nolint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in favor of:
gci write -s standard -s default -s "prefix(github.com/helmfile/vals)" pkg/providers/httpjson/httpjson.go
vals.go
Outdated
@@ -367,6 +372,7 @@ func (r *Runtime) prepare() (*expansion.ExpandRegexMatch, error) { | |||
} | |||
|
|||
return str, nil | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra empty lint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this line 👍
Signed-off-by: Paul Grant <paulfgrant01@gmail.com>
70c1ff8
to
3c00eb7
Compare
pkg/providers/httpjson/httpjson.go
Outdated
return p | ||
} | ||
|
||
func GetXpathFromUri(uri string) (xpath string, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what will happen if uri is empty? and add unittest for function as possible as you can. thanks so much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added unit testing 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 🙏
… various fixes Signed-off-by: Paul Grant <paulfgrant01@gmail.com>
… various fixes Signed-off-by: Paul Grant <paulfgrant01@gmail.com>
Signed-off-by: Paul Grant <paulfgrant01@gmail.com>
Signed-off-by: Paul Grant <paulfgrant01@gmail.com>
based on Issue 267
This provider will retrieve a single key from a JSON structure hosted by an HTTP frontend. The signature will require both the domain and the xpath e.g.
ref+httpjson://<DOMAIN>/<PATH>?[insecure=false&floatAsInt=false]#/<XPATH>