-
Notifications
You must be signed in to change notification settings - Fork 61
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
Adds Scalyr logging endpoint support #73
Conversation
We just released region support for Scalyr logging. The API documentation has been updated if you'd like to include support for that in the CLI. Thanks! |
Conflict fix is over at e556630 |
@akappen Awesome! We will have to include in |
@phamann I'm going to come back to this to address this comment, but I would like your thoughts on the |
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.
👍 LGTM. Regardless of the small nits around certain input validations, I like the new crateInput()
pattern overall and how you've tested it. I'm on the fence around the naming convention of scalyr_test.go.
and api_test.go
as this breaks convention from the rest of the project. What was your reasoning for keeping createInput()
private and thus having this fork?
pkg/logging/scalyr/create.go
Outdated
if c.Version <= 0 { | ||
return nil, fmt.Errorf("error invalid value for required field (version): %d", c.Version) | ||
} | ||
|
||
input.Version = c.Version |
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.
Whilst this is good, we don't validate negative numbers for version input anywhere else in the project. I'm also conscious of doing this kind of client-side validation when the API will do it anyway.
The big revelation for me here is why are the version fields in go-fastly uint
's to avoid this completely 😱 (not your fault, just convention there I hadn't realised until now)
Force-pushed rebasing master. |
Force-pushed squashing into a single commit. |
Signed-off-by: Colton McCurdy <cmccurdy@fastly.com>
Force-pushed rebasing master. |
Relevant (Referenced) Link(s)
Validation