/
githubmirror
/
GoFrame
Обзор
Документация
Войти
/
githubmirror
/
GoFrame
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
net/ghttp/ghttp_server_plugin.go
22 строки
912 B
houseme
improve comment
19 мар 2022, 12:58
19 мар 2022, 12:58
8357b0f
Код
Авторство
О чём код?
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package ghttp // Plugin is the interface for server plugin. type Plugin interface { Name() string // Name returns the name of the plugin. Author() string // Author returns the author of the plugin. Version() string // Version returns the version of the plugin, like "v1.0.0". Description() string // Description returns the description of the plugin. Install(s *Server) error // Install installs the plugin before the server starts. Remove() error // Remove removes the plugin. } // Plugin adds plugin to the server. func (s *Server) Plugin(plugin ...Plugin) { s.plugins = append(s.plugins, plugin...) }