Documentation ¶
Index ¶
- Constants
- Variables
- type AddRemoteParams
- type AddRemoteRsp
- type GetNodeInfoRsp
- type GetUserListRsp
- type NodeInfo
- type Panel
- type Plugin
- type PluginClient
- type PluginImplClient
- func (c *PluginImplClient) AddRemote(params *AddRemoteParams) (r *AddRemoteRsp)
- func (c *PluginImplClient) DelRemote(id int) error
- func (c *PluginImplClient) GetNodeInfo(id int) (r *GetNodeInfoRsp)
- func (c *PluginImplClient) GetUserList(id int) (r *GetUserListRsp)
- func (c *PluginImplClient) ReportUserTraffic(p *ReportUserTrafficParams) (err error)
- type PluginImplServer
- func (s *PluginImplServer) AddRemote(params *AddRemoteParams, r *AddRemoteRsp) error
- func (s *PluginImplServer) DelRemote(id int, _ any)
- func (s *PluginImplServer) GetNodeInfo(id int, r *GetNodeInfoRsp) error
- func (s *PluginImplServer) GetUserList(id int, r *GetUserListRsp) error
- func (s *PluginImplServer) ReportUserTraffic(p *ReportUserTrafficParams, err *error) error
- type PluginServer
- type ReportUserTrafficParams
- type UserInfo
- type UserTrafficInfo
Constants ¶
View Source
const ( NoTls = 0 Tls = 1 )
View Source
const PluginName = "ratte-panel"
Variables ¶
View Source
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "is-ratte-panel",
MagicCookieValue: "true",
}
Functions ¶
This section is empty.
Types ¶
type AddRemoteParams ¶
type AddRemoteRsp ¶
type GetNodeInfoRsp ¶
func (*GetNodeInfoRsp) GetHash ¶
func (g *GetNodeInfoRsp) GetHash() string
type GetUserListRsp ¶
func (*GetUserListRsp) GetHash ¶
func (g *GetUserListRsp) GetHash() string
type Panel ¶
type Panel interface { AddRemote(params *AddRemoteParams) *AddRemoteRsp DelRemote(id int) error GetNodeInfo(id int) *GetNodeInfoRsp GetUserList(id int) *GetUserListRsp ReportUserTraffic(p *ReportUserTrafficParams) error }
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
type PluginClient ¶
type PluginClient struct { Panel *baseplugin.Client }
func (*PluginClient) Close ¶
func (c *PluginClient) Close() error
type PluginImplClient ¶
type PluginImplClient struct {
// contains filtered or unexported fields
}
func (*PluginImplClient) AddRemote ¶
func (c *PluginImplClient) AddRemote(params *AddRemoteParams) (r *AddRemoteRsp)
func (*PluginImplClient) DelRemote ¶
func (c *PluginImplClient) DelRemote(id int) error
func (*PluginImplClient) GetNodeInfo ¶
func (c *PluginImplClient) GetNodeInfo(id int) (r *GetNodeInfoRsp)
func (*PluginImplClient) GetUserList ¶
func (c *PluginImplClient) GetUserList(id int) (r *GetUserListRsp)
func (*PluginImplClient) ReportUserTraffic ¶
func (c *PluginImplClient) ReportUserTraffic(p *ReportUserTrafficParams) (err error)
type PluginImplServer ¶
type PluginImplServer struct {
// contains filtered or unexported fields
}
func (*PluginImplServer) AddRemote ¶
func (s *PluginImplServer) AddRemote(params *AddRemoteParams, r *AddRemoteRsp) error
func (*PluginImplServer) DelRemote ¶
func (s *PluginImplServer) DelRemote(id int, _ any)
func (*PluginImplServer) GetNodeInfo ¶
func (s *PluginImplServer) GetNodeInfo(id int, r *GetNodeInfoRsp) error
func (*PluginImplServer) GetUserList ¶
func (s *PluginImplServer) GetUserList(id int, r *GetUserListRsp) error
func (*PluginImplServer) ReportUserTraffic ¶
func (s *PluginImplServer) ReportUserTraffic(p *ReportUserTrafficParams, err *error) error
type PluginServer ¶
type PluginServer struct {
*baseplugin.Server
}
func NewServer ¶
func NewServer(l hclog.Logger, p Panel) (*PluginServer, error)
type ReportUserTrafficParams ¶
type ReportUserTrafficParams struct { Id int Users []UserTrafficInfo }
type UserInfo ¶
func (*UserInfo) GetHashOrKey ¶
Click to show internal directories.
Click to hide internal directories.