answer/plugin/base.go

23 lines
415 B
Go
Raw Normal View History

2022-12-30 10:21:41 +08:00
package plugin
// Info presents the plugin information
type Info struct {
Name Translator
2023-01-10 16:43:42 +08:00
SlugName string
Description Translator
2022-12-30 10:21:41 +08:00
Author string
Version string
}
// Base is the base plugin
type Base interface {
// Info returns the plugin information
Info() Info
}
var (
// CallBase is a function that calls all registered base plugins
CallBase,
2023-01-10 16:43:42 +08:00
registerBase = MakePlugin[Base](true)
2022-12-30 10:21:41 +08:00
)