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

Define API and Go client function to access API configuration metadata #627

Merged
merged 5 commits into from
Mar 20, 2024

Conversation

presztak
Copy link
Collaborator

  • Adds a new MetadataConfiguration struct in shared/api
  • Adds a new GetMetadataConfiguration function in client to access the endpoint
  • Renames incusd/documents.go to incusd/metadata.go

Fixes: #600

@presztak presztak requested a review from stgraber as a code owner March 16, 2024 19:49
@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Mar 16, 2024
@presztak
Copy link
Collaborator Author

@stgraber do we need to add API extension as well?

@stgraber
Copy link
Member

It depends, if no extension was introduced when the server side API was first introduced, then we should add one now.

If there is an existing extension for the current server side API then we should just check for that.

@presztak
Copy link
Collaborator Author

If there is an existing extension for the current server side API then we should just check for that.

yup, we have, and I've added check for it.

@stgraber
Copy link
Member

Looking great, thanks!

I'll spend a bit of time on the flight back home tweaking the Go struct a bit.
I basically want to see if I can make it contain less hardcoded info about the various types/sections as well as rename some of the Go fields to be clearer about what they are.

I considered also changing the JSON field names but that'd actually be an API breakage so I'll refrain from doing that :)

presztak and others added 5 commits March 20, 2024 11:35
The generated configuration metadata is quite painful to manually
interact with, so to make it easier, lets provide an initial helper
function.

Signed-off-by: Stéphane Graber <[email protected]>
@stgraber stgraber merged commit 201e653 into lxc:main Mar 20, 2024
25 checks passed
@presztak presztak deleted the metadata_configuration branch November 14, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating
Development

Successfully merging this pull request may close these issues.

Define proper API and Go client function to access API configuration metadata
2 participants