You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
389 B
20 lines
389 B
package crud
|
|
|
|
import "github.com/labstack/echo/v4"
|
|
|
|
type Service interface {
|
|
// Name 服务名称
|
|
Name() string
|
|
// Priority 优先级,用于启动和销毁的执行顺序
|
|
Priority() int
|
|
// Init 初始化服务
|
|
Init(ctx *Context) error
|
|
// Bootstrap 启动服务
|
|
Bootstrap() error
|
|
// Destroy 销毁服务
|
|
Destroy() error
|
|
}
|
|
|
|
type Routable interface {
|
|
InitRoutes(r *echo.Group)
|
|
}
|
|
|