Server plugins
Corteza implements the support for Go plugins which can be used to modify default behaviour of the server and provide new functionalities like workflow functions and types.
Basic plugin structure
package main
type (
examplePlugin struct {} (1)
)
func CortezaPlugin() interface{} { (2)
return &examplePlugin{}
}
1 | Plugin struct. Beside the functions required by the interface (Setup, Initialize, …) you are free to add your own fields and functions. |
2 | Be sure you return an interface{} , otherwise Corteza can not cast it to plugin. |
Supported hooks
In order to hook into the server setup procedure, your plugin should implement the
|
|
In order to hook into the server initialization procedure, your plugin should implement the
|
|
In order to register additional automation (workflow) functions, your plugin should implement the You can override existing functions by using same function reference.
|