Versions in this module Expand all Collapse all v0 v0.5.4 May 13, 2020 v0.5.3 May 13, 2020 v0.5.2 May 13, 2020 v0.5.1 May 13, 2020 v0.4.45 May 13, 2020 v0.4.5 May 13, 2020 v0.4.3 May 13, 2020 v0.4.2 May 13, 2020 v0.4.1 May 13, 2020 v0.4.0 May 13, 2020 Changes in this version + func InStr(s string, list []string) bool + type Config struct + CheckRate int + IgnoreEmptyVmessID bool + MySQL *MySQLConfig + NodeID uint + UserConfig *UserConfig + type DB struct + DB *gorm.DB + RetryTimes int64 + func NewMySQLConn(config *MySQLConfig) (*DB, error) + func (db *DB) GetAllUsers() ([]UserModel, error) + func (db *DB) GetNode(id uint) (*Node, error) + type HandlerServiceClient struct + func NewHandlerServiceClient(client *grpc.ClientConn, inboundTag string) *HandlerServiceClient + func (h *HandlerServiceClient) AddUser(user *protocol.User) error + func (h *HandlerServiceClient) AlterInbound(req *command.AlterInboundRequest) error + func (h *HandlerServiceClient) DelUser(email string) error + type MySQLConfig struct + DBName string + Host string + Password string + Port int + User string + func (c *MySQLConfig) FormatDSN() (string, error) + type Node struct + ID uint + TrafficRate float64 + func (*Node) TableName() string + type NodeIP struct + CreatedAt int64 + ID uint + IPList string + NodeID uint + Port int + UserID uint + func (*NodeIP) TableName() string + func (n *NodeIP) BeforeCreate(scope *gorm.Scope) error + type NodeInfo struct + ID uint + Load string + LogTime int64 + NodeID uint + Uptime time.Duration + func (*NodeInfo) TableName() string + func (l *NodeInfo) BeforeCreate(scope *gorm.Scope) error + type NodeOnlineLog struct + ID uint + LogTime int64 + NodeID uint + OnlineUser int + func (*NodeOnlineLog) TableName() string + func (l *NodeOnlineLog) BeforeCreate(scope *gorm.Scope) error + type Panel struct + func NewPanel(gRPCConn *grpc.ClientConn, db *DB, cfg *Config) (*Panel, error) + func (p *Panel) Start() + type StatsServiceClient struct + func NewStatsServiceClient(client *grpc.ClientConn) *StatsServiceClient + type UserConfig struct + AlterID uint32 + InboundTag string + Level uint32 + SecurityStr string + func (c *UserConfig) UnmarshalJSON(data []byte) error + type UserModel struct + Email string + ID uint + Port int + VmessID string + func (*UserModel) TableName() string + type UserTrafficLog struct + Downlink uint64 + ID uint + LogTime int64 + NodeID uint + Rate float64 + Traffic string + Uplink uint64 + UserID uint + func (l *UserTrafficLog) BeforeCreate(scope *gorm.Scope) error