File size: 327 Bytes
581b6d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package plugins

import (
	"WarpGPT/pkg/db"
	"WarpGPT/pkg/env"
	"github.com/gin-gonic/gin"
	"github.com/sirupsen/logrus"
)

type Component struct {
	Engine *gin.Engine
	Db     db.DB
	Logger *logrus.Logger
	Env    *env.ENV
	Auth   func(arkType int, puid string) (string, error)
}

type Plugin interface {
	Run(com *Component)
}