V2bX/core/interface.go
2023-07-29 19:27:15 +08:00

24 lines
569 B
Go

package core
import (
"github.com/InazumaV/V2bX/api/panel"
"github.com/InazumaV/V2bX/conf"
)
type AddUsersParams struct {
Tag string
Config *conf.Options
UserInfo []panel.UserInfo
NodeInfo *panel.NodeInfo
}
type Core interface {
Start() error
Close() error
AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error
DelNode(tag string) error
AddUsers(p *AddUsersParams) (added int, err error)
GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64)
DelUsers(users []panel.UserInfo, tag string) error
Protocols() []string
}