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 an endpoint and client method to fetch the boards cloud limits #3058
Conversation
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.
Just wondering if non plugin should be error or not otherwise. LGTM
func (a *App) GetBoardsCloudLimits() (*model.BoardsCloudLimits, error) { | ||
if a.pluginAPI == nil { | ||
return nil, ErrNilPluginAPI | ||
} |
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.
It depends on the UI implementation, but should this just return an unlimited BoardCloudLimits
object, so that the UI code works the same.
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.
0/5 on this, I've updated the response to return a Not Implemented
to follow what Channels is doing for unlicensed and non-cloud instances, but I'm happy to return an empty object. Limit = 0
should effectively be the same as no limit, so we can make no distinction and do it like that
025ce5c
to
186bf14
Compare
I'm cherrypicking this to |
…3058) * Add an endpoint and client method to fetch the boards cloud limits * Fix linter * Respond with Not Implemented if the plugin is not set * Fixing server tests * lint fix Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Summary
This PR updates the server dependency to be able to use the new cloud limit plugin APIs and adds an endpoint and a client method to generate and fetch the Boards version of Cloud Limits.
A follow up PR will populate the two fields of the new struct (cardLimitTimestamp and usedCards).