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

Add the IOTICS circle services #40

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Add the IOTICS circle services #40

merged 2 commits into from
Oct 28, 2024

Conversation

StephanieBracaloni
Copy link
Contributor

Add IOTICS circle services:

  • upsert
  • describe
  • delete
  • list all

The remaining one will be part of another PR

@vtermanis vtermanis marked this pull request as ready for review October 28, 2024 09:53
// Services only affect local resources.
service CircleAPI {

// UpsertCircle creates or update a circle with its metadata.
Copy link
Contributor

Choose a reason for hiding this comment

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

Creates or updates

(same for twin)

// DeleteCircle deletes a circle.
rpc DeleteCircle(DeleteCircleRequest) returns (DeleteCircleResponse) {}

// Describes a circle.
Copy link
Contributor

Choose a reason for hiding this comment

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

(pedantic) Based on how the other ones are written, should this and the below one say e.g.:
"DescribeCircle describes a circle"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this was mandatory due to the previous linter we were using. But this information is redundant and annoying to maintain.

}


message UpsertCircleRequest {
Copy link
Contributor

Choose a reason for hiding this comment

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

(unimportant) some of the other definitions also have a docstring for each message type. (So I added them for e.g. the ACL PR). But I also appreciate that they are self-explanatory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes same.
We prefer to go with consistency over "better" approach for the logic but we can stop adding redundant comments

Copy link
Contributor

@vtermanis vtermanis left a comment

Choose a reason for hiding this comment

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

LGTM ✔️

V. minor docstring observations only.

Copy link
Contributor

@captnz captnz left a comment

Choose a reason for hiding this comment

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

lgtm

@StephanieBracaloni
Copy link
Contributor Author

Thanks for the reviews

@StephanieBracaloni StephanieBracaloni merged commit 493376f into main Oct 28, 2024
1 check passed
@StephanieBracaloni StephanieBracaloni deleted the ei-3422 branch October 28, 2024 14:08
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.

3 participants