-
Notifications
You must be signed in to change notification settings - Fork 75
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
[WIP] Add Decred plugin. #212
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.
I know it's not finished yet, but I looked at the code and made a couple comments inline.
politeiad/api/v1/v1.go
Outdated
type Plugin struct { | ||
ID string `json:"id"` // Identifier | ||
Version string `json:"version"` // Version | ||
Settings []PluginSetting `json:"setting"` // Settings |
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.
I think this should be "settings"
.
ID string `json:"id"` // Plugin identifier | ||
Command string `json:"command"` // Command identifier | ||
CommandID string `json:"commandid"` // User setable command identifier | ||
Payload string `json:"payload"` // Actual command reply |
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.
Does the reply need to include ID
, Command
and CommandID
if the client already has that info?
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.
Yes, there can be multiple plugins.
politeiad/backend/backend.go
Outdated
// Obtain plugin settings | ||
GetPlugins() ([]Plugin, error) | ||
|
||
// Pligin pass-through command |
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.
Typo
politeiad/backend/gitbe/gitbe.go
Outdated
@@ -2122,6 +2122,23 @@ func (g *gitBackEnd) Inventory(vettedCount, branchCount uint, includeFiles bool) | |||
return pr, br, nil | |||
} | |||
|
|||
// GetPlugins returns the decred plugin settings. |
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.
This doc should probably be more generic, like "GetPlugins returns a list of currently supported plugins and their settings."
86065b0
to
5087dcf
Compare
2f0e357
to
a9cd8c9
Compare
078fecd
to
160b7b1
Compare
inventory is a mess; start recreating it using a map but keep old one in place for now flesh out api some more genericize md decoding convert comments to use new inventory decode voting add changes metadata
remove b.inventory and annotate areas that need fixup fuck you rebase
* Fix some issues with _inventory cache with unit tests. * Fix several unit tests that are broken from refactoring inventory. * Fix the rest of the failing www tests.
…n the right status before proceeding
… through expected failures and success
…, help from jrick
Finished in #242 |
No description provided.