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

Split out HTTP + Handlers #36

Merged
merged 6 commits into from
Sep 7, 2022
Merged

Split out HTTP + Handlers #36

merged 6 commits into from
Sep 7, 2022

Conversation

thomshutt
Copy link
Contributor

@thomshutt thomshutt commented Sep 7, 2022

We're going to deprecate the giant PR in #30 and try to split it into a series of more manageable / reviewable ones.

This one creates a more manageable base in terms of package structure by only doing CLI stuff in the cmd package and moving HTTP layer functions into api. It also splits out handlers/handlers.go into different files based on functionality - e.g handlers/upload.go. It also moves the Mist client into the clients package.

@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Merging #36 (e66b57f) into main (f8d600f) will decrease coverage by 0.29766%.
The diff coverage is 29.95595%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##                main         #36         +/-   ##
===================================================
- Coverage   44.72441%   44.42675%   -0.29767%     
===================================================
  Files              8          12          +4     
  Lines            635         628          -7     
===================================================
- Hits             284         279          -5     
+ Misses           314         312          -2     
  Partials          37          37                 
Impacted Files Coverage Δ
clients/mist_client.go 50.48544% <ø> (ø)
clients/mist_client_mock.go 0.00000% <ø> (ø)
handlers/handlers.go 100.00000% <ø> (+70.50000%) ⬆️
handlers/triggers.go 0.00000% <0.00000%> (ø)
middleware/logging.go 0.00000% <0.00000%> (ø)
handlers/transcode.go 44.44444% <44.44444%> (ø)
handlers/upload.go 47.76119% <47.76119%> (ø)
api/http.go 57.14286% <57.14286%> (ø)
handlers/ok.go 100.00000% <100.00000%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8d600f...e66b57f. Read the comment docs.

Impacted Files Coverage Δ
clients/mist_client.go 50.48544% <ø> (ø)
clients/mist_client_mock.go 0.00000% <ø> (ø)
handlers/handlers.go 100.00000% <ø> (+70.50000%) ⬆️
handlers/triggers.go 0.00000% <0.00000%> (ø)
middleware/logging.go 0.00000% <0.00000%> (ø)
handlers/transcode.go 44.44444% <44.44444%> (ø)
handlers/upload.go 47.76119% <47.76119%> (ø)
api/http.go 57.14286% <57.14286%> (ø)
handlers/ok.go 100.00000% <100.00000%> (ø)

@emranemran
Copy link
Collaborator

LGTM - didn't find any issues with the logic but we can address after everything is merged and tested.

@emranemran emranemran merged commit 14b71d8 into main Sep 7, 2022
@emranemran emranemran deleted the split-http-handlers branch September 7, 2022 22:07
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.

2 participants