Some checks failed
CI / init (push) Has been cancelled
CI / Frontend node 18.16.0 (push) Has been cancelled
CI / Backend go (1.22) (push) Has been cancelled
CI / devops-test (1.22, 18.16.0) (push) Has been cancelled
CI / release-pr (push) Has been cancelled
CI / release-please (push) Has been cancelled
CI / devops-prod (1.22, 18.x) (push) Has been cancelled
CI / docker (push) Has been cancelled
33 lines
974 B
Go
33 lines
974 B
Go
package announcement
|
||
|
||
import (
|
||
"context"
|
||
"github.com/flipped-aurora/gin-vue-admin/server/plugin/announcement/initialize"
|
||
interfaces "github.com/flipped-aurora/gin-vue-admin/server/utils/plugin/v2"
|
||
"github.com/gin-gonic/gin"
|
||
)
|
||
|
||
var _ interfaces.Plugin = (*plugin)(nil)
|
||
|
||
var Plugin = new(plugin)
|
||
|
||
type plugin struct{}
|
||
|
||
func init() {
|
||
interfaces.Register(Plugin)
|
||
}
|
||
|
||
func (p *plugin) Register(group *gin.Engine) {
|
||
ctx := context.Background()
|
||
// 如果需要配置文件,请到config.Config中填充配置结构,且到下方发放中填入其在config.yaml中的key
|
||
// initialize.Viper()
|
||
// 安装插件时候自动注册的api数据请到下方法.Api方法中实现
|
||
initialize.Api(ctx)
|
||
// 安装插件时候自动注册的Menu数据请到下方法.Menu方法中实现
|
||
initialize.Menu(ctx)
|
||
// 安装插件时候自动注册的Dictionary数据请到下方法.Dictionary方法中实现
|
||
initialize.Dictionary(ctx)
|
||
initialize.Gorm(ctx)
|
||
initialize.Router(group)
|
||
}
|