-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fixes #16: breaking up the project into different files and formatting code better #18
Conversation
I also feel like we should have #14 added in as soon as we can so that we can safely move ahead. |
Token string | ||
URL string | ||
Certificate string | ||
HTTPClient *http.Client |
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.
this should not be exposed so httpClient
.
) | ||
|
||
// Struct for IntelOwl. | ||
// Initiate it using Token, Instance, Certificate | ||
type IntelOwlClient struct { | ||
BaseURL string | ||
Token string | ||
URL string |
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.
not needed
) | ||
|
||
// Struct for IntelOwl. | ||
// Initiate it using Token, Instance, Certificate | ||
type IntelOwlClient struct { | ||
BaseURL string | ||
Token string |
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.
should not be exposed.
return response | ||
type Response struct { | ||
Code int | ||
Data string |
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.
should be interface{}
type Response struct { | ||
Code int | ||
Data string | ||
Success bool |
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.
rename to OK
"net/http" | ||
) | ||
|
||
type JobTag struct { |
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.
not needed
file_name string `json:"file_name"` | ||
file_mimetype string `json:"file_mimetype"` | ||
status string `json:"status"` | ||
tags JobTags `json:"tags"` |
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.
replace w/ Tags[]
no_of_connectors_executed string `json:"no_of_connectors_executed"` | ||
} | ||
|
||
type JobList []Job |
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.
redundant, just use []Job
Please let me know if I can do the tests better and the commenting better. I will implement the feedback. The sooner I know what to improve here, The sooner can I make the right changes and get to implementing other API endpoints.