Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

0x0elliot
Copy link
Member

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.

@0x0elliot 0x0elliot changed the title Fixes #16: breaking up the project into objects and formatting code better Fixes #16: breaking up the project into different files and formatting code better Jan 28, 2022
@0x0elliot
Copy link
Member Author

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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 {
Copy link
Member

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"`
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant, just use []Job

@0x0elliot 0x0elliot closed this Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants