Documentation ¶
Overview ¶
Package pluginkit defines the Dogma application plugin API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationService ¶
type ApplicationService interface { // ApplicationKeys returns the identity keys of the applications that can be // created via this service. ApplicationKeys() []string // NewApplication returns a new instance of an application. // // k is the application's identity key. It returns an error if k is not one // of the keys returned by ApplicationKeys(). // // The returned io.Closer, if non-nil, is used to free any resources // allocated for the application, such as closing database connections. NewApplication(ctx context.Context, k string) (dogma.Application, io.Closer, error) }
ApplicationService is a plugin service that can instantiate Dogma applications.
type Plugin ¶
type Plugin interface { // File returns the path to the plugin file, as passed to Load(). File() string // ApplicationService returns the plugin's ApplicationService, if it is // implemented. ApplicationService() (ApplicationService, bool) // Close closes the plugin. Close() error }
Plugin is an interface for using services provided by a Dogma plugin.
Click to show internal directories.
Click to hide internal directories.