Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
NodeID uint `json:"nodeId"`
CheckRate int `json:"checkRate"`
MySQL *MySQLConfig `json:"mysql"`
UserConfig *UserConfig `json:"user"`
IgnoreEmptyVmessID bool `json:"ignoreEmptyVmessID"`
NodeClass string `json:"NodeClass"`
// contains filtered or unexported fields
}
type DB ¶
func NewMySQLConn ¶
func NewMySQLConn(config *MySQLConfig) (*DB, error)
type HandlerServiceClient ¶
type HandlerServiceClient struct {
command.HandlerServiceClient
// contains filtered or unexported fields
}
func NewHandlerServiceClient ¶
func NewHandlerServiceClient(client *grpc.ClientConn, inboundTag string) *HandlerServiceClient
func (*HandlerServiceClient) AddUser ¶
func (h *HandlerServiceClient) AddUser(user *protocol.User) error
func (*HandlerServiceClient) AlterInbound ¶
func (h *HandlerServiceClient) AlterInbound(req *command.AlterInboundRequest) error
func (*HandlerServiceClient) DelUser ¶
func (h *HandlerServiceClient) DelUser(email string) error
type MySQLConfig ¶
type MySQLConfig struct {
Host string `json:"host"`
Port int `json:"port"`
User string `json:"user"`
Password string `json:"password"`
DBName string `json:"dbname"`
}
func (*MySQLConfig) FormatDSN ¶
func (c *MySQLConfig) FormatDSN() (string, error)
type NodeIP ¶
type NodeInfo ¶
type NodeOnlineLog ¶
func (*NodeOnlineLog) BeforeCreate ¶
func (l *NodeOnlineLog) BeforeCreate(scope *gorm.Scope) error
func (*NodeOnlineLog) TableName ¶
func (*NodeOnlineLog) TableName() string
type StatsServiceClient ¶
type StatsServiceClient struct {
statsservice.StatsServiceClient
}
func NewStatsServiceClient ¶
func NewStatsServiceClient(client *grpc.ClientConn) *StatsServiceClient
type UserConfig ¶
type UserConfig struct {
InboundTag string `json:"inboundTag"`
Level uint32 `json:"level"`
AlterID uint32 `json:"alterId"`
SecurityStr string `json:"securityConfig"`
// contains filtered or unexported fields
}
func (*UserConfig) UnmarshalJSON ¶
func (c *UserConfig) UnmarshalJSON(data []byte) error
type UserModel ¶
type UserTrafficLog ¶
type UserTrafficLog struct {
ID uint `gorm:"primary_key"`
UserID uint
Uplink uint64 `gorm:"column:u"`
Downlink uint64 `gorm:"column:d"`
NodeID uint
Rate float64
Traffic string
LogTime int64
}
func (*UserTrafficLog) BeforeCreate ¶
func (l *UserTrafficLog) BeforeCreate(scope *gorm.Scope) error
Click to show internal directories.
Click to hide internal directories.