gfutil

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(opt ...Option) ghttp.Plugin

Types

type Option

type Option func(wrapper *PluginWrapper)

Option of wrapper

func WithAuthor

func WithAuthor(author string) Option

func WithDescription

func WithDescription(description string) Option

func WithInstallHandler

func WithInstallHandler(i PluginRouterGroupHandler) Option

func WithMiddleware

func WithMiddleware(middleware ...ghttp.HandlerFunc) Option

func WithName

func WithName(name string) Option

func WithPrefix

func WithPrefix(prefix string) Option

func WithRemoveHandler

func WithRemoveHandler(removeHandler func() error) Option

func WithVersion

func WithVersion(version string) Option

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) Install

func (p PluginWrapper) Install(s *ghttp.Server) error

func (PluginWrapper) Name

func (p PluginWrapper) Name() string

func (PluginWrapper) Remove

func (p PluginWrapper) Remove() error

func (PluginWrapper) Version

func (p PluginWrapper) Version() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL