-
-
Notifications
You must be signed in to change notification settings - Fork 600
/
pluginconf.go
69 lines (67 loc) · 1.75 KB
/
pluginconf.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package model
// PluginConf holds information about the plugin.
type PluginConf struct {
ID uint `gorm:"primary_key;AUTO_INCREMENT;index"`
UserID uint
ModulePath string `gorm:"type:text"`
Token string `gorm:"type:varchar(180);unique_index"`
ApplicationID uint
Enabled bool
Config []byte
Storage []byte
}
// PluginConfExternal Model
//
// Holds information about a plugin instance for one user.
//
// swagger:model PluginConf
type PluginConfExternal struct {
// The plugin id.
//
// read only: true
// required: true
// example: 25
ID uint `json:"id"`
// The plugin name.
//
// read only: true
// required: true
// example: RSS poller
Name string `json:"name"`
// The user name. For login.
//
// required: true
// example: P1234
Token string `binding:"required" json:"token" query:"token" form:"token"`
// The module path of the plugin.
//
// example: github.com/gotify/server/plugin/example/echo
// read only: true
// required: true
ModulePath string `json:"modulePath" form:"modulePath" query:"modulePath"`
// The author of the plugin.
//
// example: jmattheis
// read only: true
Author string `json:"author,omitempty" form:"author" query:"author"`
// The website of the plugin.
//
// example: gotify.net
// read only: true
Website string `json:"website,omitempty" form:"website" query:"website"`
// The license of the plugin.
//
// example: MIT
// read only: true
License string `json:"license,omitempty" form:"license" query:"license"`
// Whether the plugin instance is enabled.
//
// example: true
// required: true
Enabled bool `json:"enabled"`
// Capabilities the plugin provides
//
// example: ["webhook","display"]
// required: true
Capabilities []string `json:"capabilities"`
}