Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServiceRoute ¶
type HTTPServiceRoute struct { //The service endpoint Route string //The mothod of the service Method string //The label will be set into the plugin context to //let the plugin aware what kind of request is incoming for serving Label string }
HTTPServiceRoute defines the http/rest service endpoint served by the plugin
type HTTPServices ¶
type HTTPServices struct { //The http service provider //Support 'beego' Driver string //Routes should be enabled on the driver Routes []HTTPServiceRoute }
HTTPServices defines the metadata of http service served by the plugin
type Plugin ¶
type Plugin struct { //Name of the plugin, required Name string //SemVer 2 version, required Version string //A one line sentence about the function of the plugin, optional Description string //The source repository of the plugin code, optional Home string //The maintainer list with 'Maintainer <email>' format of the plugin Maintainers []string //The source for loading the plugin with specified mode Source *Source //The HTTP service should be served by the plugin HTTPServices *HTTPServices }
Plugin is the corresponding structure of the 'plugin.json', which describe the basic metadata of the plugin
type PluginExecutor ¶
type PluginExecutor func(ctx context.PluginContext) error
PluginExecutor is the executor of the plugin
type PluginItem ¶
type PluginItem struct { //Plugin spec Spec *Plugin //Plugin executor Executor PluginExecutor }
PluginItem is composite of plugin spec and executor
Click to show internal directories.
Click to hide internal directories.