-
Notifications
You must be signed in to change notification settings - Fork 1
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
Introduce plugin table #108
Conversation
af87177
to
7bac817
Compare
aab13a9
to
806702e
Compare
e8a319d
to
8db1d1b
Compare
c1ee4fd
to
46cb339
Compare
46cb339
to
8b39eaf
Compare
4e50f91
to
770caaa
Compare
770caaa
to
cf4bed8
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.
(So far, just the first round of findings, there'll probably be more comments in the future.)
cf4bed8
to
0260388
Compare
c7474ff
to
ac79bb8
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.
I know I'm not even good at this either, but please document at least the exported methods.
cmd/channel/email/main.go
Outdated
minValue := types.Int{NullInt64: sql.NullInt64{Int64: 0}} | ||
minValue.Valid = true | ||
|
||
maxValue := types.Int{NullInt64: sql.NullInt64{Int64: 65535}} | ||
maxValue.Valid = true |
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.
You can just set Valid
as well within the struct initializer (and then also move it into the initialization below so you don't need the extra variables).
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.
Note: types.Int
is buggy and ignores the omitempty
flag.
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.
Not sure if that's a bug of types.Int
or just a limitation of encoding/json
. Anyways, looks like it just writes null
to the JSON then. Would that be a problem for the web module?
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.
No, Web can handle it.
- Introduce a plugin table to store plugin related info. On daemon start the plugin table is upserted. - Each plugin defines its own required form elements for config as configOption(s). - Configured channels start and maintain there plugin.
…plugin termination
This is a missing change from #100
…ed/stopped plugin
a5af8d9
to
346aa21
Compare
346aa21
to
26376b9
Compare
- The Upsert() func is no longer required because Info{} contains all that properties. - Fix reciver param name of Info.TableName() method. - Remove type from GetInfo to make it non-configurable. The file name should always be used as the type.
26376b9
to
7d9227e
Compare
resolves #107