Documentation
¶
Index ¶
- func NewPlugin(opt ...Option) ghttp.Plugin
- type Option
- func WithAuthor(author string) Option
- func WithDescription(description string) Option
- func WithInstallHandler(i PluginRouterGroupHandler) Option
- func WithMiddleware(middleware ...ghttp.HandlerFunc) Option
- func WithName(name string) Option
- func WithPrefix(prefix string) Option
- func WithRemoveHandler(removeHandler func() error) Option
- func WithVersion(version string) Option
- type PluginRouterGroupHandler
- type PluginWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(wrapper *PluginWrapper)
Option of wrapper
func WithAuthor ¶
func WithDescription ¶
func WithInstallHandler ¶
func WithInstallHandler(i PluginRouterGroupHandler) Option
func WithMiddleware ¶
func WithMiddleware(middleware ...ghttp.HandlerFunc) Option
func WithPrefix ¶
func WithRemoveHandler ¶
func WithVersion ¶
type PluginRouterGroupHandler ¶
type PluginRouterGroupHandler func(group *ghttp.RouterGroup)
type PluginWrapper ¶
type PluginWrapper struct {
// contains filtered or unexported fields
}
PluginWrapper plugin wrapper
func (PluginWrapper) Author ¶
func (p PluginWrapper) Author() string
func (PluginWrapper) Description ¶
func (p PluginWrapper) Description() string
func (PluginWrapper) Name ¶
func (p PluginWrapper) Name() string
func (PluginWrapper) Remove ¶
func (p PluginWrapper) Remove() error
func (PluginWrapper) Version ¶
func (p PluginWrapper) Version() string
Click to show internal directories.
Click to hide internal directories.