mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
change project structure, fix online ip report bug
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Package api contains all the api used by XrayR
|
||||
// To implement an api , one needs to implement the interface below.
|
||||
|
||||
package api
|
||||
package panel
|
||||
|
||||
import (
|
||||
"github.com/Yuzuki616/V2bX/conf"
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// API is the interface for different panel's api.
|
||||
// Panel is the interface for different panel's api.
|
||||
|
||||
type ClientInfo struct {
|
||||
APIHost string
|
||||
@@ -39,7 +39,7 @@ type Client struct {
|
||||
NodeRuleRspMd5 [16]byte
|
||||
}
|
||||
|
||||
func New(apiConfig *conf.ApiConfig) API {
|
||||
func New(apiConfig *conf.ApiConfig) Panel {
|
||||
client := resty.New()
|
||||
client.SetRetryCount(3)
|
||||
if apiConfig.Timeout > 0 {
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package panel
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
@@ -1,6 +1,6 @@
|
||||
package api
|
||||
package panel
|
||||
|
||||
type API interface {
|
||||
type Panel interface {
|
||||
GetNodeInfo() (nodeInfo *NodeInfo, err error)
|
||||
GetUserList() (userList []UserInfo, err error)
|
||||
ReportUserTraffic(userTraffic []UserTraffic) (err error)
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package panel
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package panel
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
Reference in New Issue
Block a user