V2bX/core/interface.go
yuzuki999 42bb7bc90f update
initial support for hysteria
update config
update api
change user email format
...
2023-06-08 22:46:33 +08:00

23 lines
559 B
Go

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)
GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64)
DelUsers(users []string, tag string) error
}