2023-06-07 13:18:56 -04:00
|
|
|
package core
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/Yuzuki616/V2bX/api/panel"
|
|
|
|
"github.com/Yuzuki616/V2bX/conf"
|
|
|
|
)
|
|
|
|
|
|
|
|
type AddUsersParams struct {
|
|
|
|
Tag string
|
|
|
|
Config *conf.ControllerConfig
|
|
|
|
UserInfo []panel.UserInfo
|
|
|
|
NodeInfo *panel.NodeInfo
|
|
|
|
}
|
|
|
|
type Core interface {
|
|
|
|
Start() error
|
|
|
|
Close() error
|
|
|
|
AddNode(tag string, info *panel.NodeInfo, config *conf.ControllerConfig) error
|
|
|
|
DelNode(tag string) error
|
|
|
|
AddUsers(p *AddUsersParams) (added int, err error)
|
2023-06-08 10:46:33 -04:00
|
|
|
GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64)
|
2023-06-07 13:18:56 -04:00
|
|
|
DelUsers(users []string, tag string) error
|
2023-06-09 09:20:41 -04:00
|
|
|
Protocols() []string
|
2023-06-07 13:18:56 -04:00
|
|
|
}
|