-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
feat(rust): integrate space's subscription data in command #8296
Conversation
869b9f4
to
e2e0835
Compare
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.
Some of my comments can definitely be addressed in other PRs. My biggest concern is with inlining the whole Subscription
data into one row cell.
implementations/rust/ockam/ockam_api/src/cli_state/storage/spaces_repository_sql.rs
Outdated
Show resolved
Hide resolved
cc09508
to
1e653e5
Compare
1e653e5
to
f500194
Compare
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.
Thanks for all the changes 🏵️
Adds the subscription data to the
space
,status
andenroll
commands. This PR also improves the output construction of those commands, which led me to improve theOutput
trait.Changes to the
Output
traitIn this PR you can see that the
Subscription
struct is used in three different kinds of outputs (see images below for examples):space show
command)space list
command)Now, we want to reuse the output of the individual representation, but there are some differences we need to keep in mind: in
2.
the subscription is padded + indented; in3.
the subscription is padded.The
Output
trait lets you define the output for1.
and3.
but not for2.
and, in this case, the only difference between them is the left spacing. And I think this is also true for a lot of other structs.That being said, I've extended the
Output
trait a little to make these "left-spacing" transformations easier. You can check theSubscription
struct as an example of how to reuse theDisplay
representation and how it's also integrated in theSpace
'sDisplay
impl.enroll
Free trial + and the space has been just created:
Free trial + the space already existed:
Not a free trial subscription:
space
andstatus