Skip to content

Rework the client package #35

Merged
matt-mazzucato merged 7 commits intoastarte-platform:masterfrom
Annopaolo:revamp-client
Feb 14, 2023
Merged

Rework the client package #35
matt-mazzucato merged 7 commits intoastarte-platform:masterfrom
Annopaolo:revamp-client

Conversation

@Annopaolo
Copy link
Copy Markdown
Collaborator

As stated in #30, the client package is made more clean, idiomatic and type-safe. The request/response pattern used throughout is borrowed from Go's http module.
Close #33.

@Annopaolo Annopaolo added the enhancement New feature or request label Feb 6, 2023
In the context of astarte-platform#33, bump Go in order to use newer
features of the language. Update the CI workflows.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
@Annopaolo Annopaolo force-pushed the revamp-client branch 5 times, most recently from 572a56e to 3b7686a Compare February 7, 2023 11:53
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 7, 2023

Codecov Report

Merging #35 (b1e473b) into master (0a985df) will increase coverage by 14.62%.
The diff coverage is 42.75%.

❗ Current head b1e473b differs from pull request most recent head f4f6d75. Consider uploading reports for the commit f4f6d75 to get more accurate results

@@             Coverage Diff             @@
##           master      #35       +/-   ##
===========================================
+ Coverage   34.92%   49.54%   +14.62%     
===========================================
  Files          13       20        +7     
  Lines         982     1441      +459     
===========================================
+ Hits          343      714      +371     
- Misses        600      638       +38     
- Partials       39       89       +50     
Impacted Files Coverage Δ
client/appengine_data_paginator.go 0.00% <0.00%> (ø)
client/appengine_internal.go 46.15% <ø> (-15.58%) ⬇️
client/errors.go 0.00% <0.00%> (ø)
client/appengine.go 6.53% <6.94%> (+6.53%) ⬆️
client/appengine_stream.go 27.27% <27.27%> (ø)
client/appengine_data.go 31.89% <31.89%> (ø)
client/data.go 40.00% <40.00%> (ø)
client/appengine_groups.go 37.28% <40.74%> (+37.28%) ⬆️
client/housekeeping.go 45.61% <45.61%> (+45.61%) ⬆️
client/realm_management.go 46.90% <46.90%> (+46.90%) ⬆️
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

As stated in astarte-platform#33, currently the client package has a number of issues.
For start, provide a new, state-of-the-art, client API (using functional options).

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
@Annopaolo Annopaolo marked this pull request as ready for review February 7, 2023 13:24
Copy link
Copy Markdown
Collaborator

@matt-mazzucato matt-mazzucato left a comment

Choose a reason for hiding this comment

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

Besides the required small changes, I think it would be beneficial adding (within the README) minimal guidelines about the advised development paths.

In the context of astarte-platform#33, rationalize and update the current API for
interacting with Astarte Pairing. Use a type-safe request/response pattern.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
In the context of astarte-platform#33, rationalize and update the current API for
interacting with Astarte Housekeeping. Use a type-safe request/response pattern.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
In the context of astarte-platform#33, rationalize and update the current API for
interacting with Astarte Realm Management. Use a type-safe request/response pattern.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
In the context of astarte-platform#33, rationalize and update the current API for
interacting with Astarte Appengine. Use a type-safe request/response pattern.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
@Annopaolo Annopaolo force-pushed the revamp-client branch 4 times, most recently from 1d7ce03 to b1e473b Compare February 10, 2023 15:06
@Annopaolo Annopaolo requested a review from rbino February 10, 2023 15:13
As the last step of resolving astarte-platform#33, replace the old client package
with a new one, more idiomatic and simple.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
@matt-mazzucato matt-mazzucato merged commit 81f06f9 into astarte-platform:master Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework the client package

4 participants