Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changes ¶
type Changes struct {
Id uint64 `json:"id" gorm:"primaryKey;autoIncrement"`
DateTime int64 `json:"dateTime" gorm:"index:idx_changes_actor_time,priority:2;index:idx_changes_key_time,priority:2;index:idx_changes_time"`
Actor string `json:"actor" gorm:"index:idx_changes_actor_time,priority:1"`
Key string `json:"key" gorm:"index:idx_changes_key_time,priority:1"`
Action string `json:"action"`
Obj json.RawMessage `json:"obj"`
}
type Client ¶
type Client struct {
Id uint `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Enable bool `json:"enable" form:"enable"`
Name string `json:"name" form:"name"`
SubId string `json:"subId" form:"subId" gorm:"column:sub_id;index"`
Config json.RawMessage `json:"config,omitempty" form:"config"`
Inbounds json.RawMessage `json:"inbounds" form:"inbounds"`
Links json.RawMessage `json:"links,omitempty" form:"links"`
Volume int64 `json:"volume" form:"volume"`
Expiry int64 `json:"expiry" form:"expiry"`
Down int64 `json:"down" form:"down"`
Up int64 `json:"up" form:"up"`
Desc string `json:"desc" form:"desc"`
Group string `json:"group" form:"group"`
// Delay start and periodic reset
DelayStart bool `json:"delayStart" form:"delayStart" gorm:"default:false;not null"`
AutoReset bool `json:"autoReset" form:"autoReset" gorm:"default:false;not null"`
ResetDays int `json:"resetDays" form:"resetDays" gorm:"default:0;not null"`
NextReset int64 `json:"nextReset" form:"nextReset" gorm:"default:0;not null"`
TotalUp int64 `json:"totalUp" form:"totalUp" gorm:"default:0;not null"`
TotalDown int64 `json:"totalDown" form:"totalDown" gorm:"default:0;not null"`
}
type Endpoint ¶
type Endpoint struct {
Id uint `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Type string `json:"type" form:"type"`
Tag string `json:"tag" form:"tag" gorm:"unique"`
Options json.RawMessage `json:"-" form:"-"`
Ext json.RawMessage `json:"ext" form:"ext"`
}
func (Endpoint) MarshalJSON ¶
MarshalJSON customizes marshalling
func (*Endpoint) UnmarshalJSON ¶
type Inbound ¶
type Inbound struct {
Id uint `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Type string `json:"type" form:"type"`
Tag string `json:"tag" form:"tag" gorm:"unique"`
// Foreign key to tls table
TlsId uint `json:"tls_id" form:"tls_id"`
Tls *Tls `json:"tls" form:"tls" gorm:"foreignKey:TlsId;references:Id"`
Addrs json.RawMessage `json:"addrs" form:"addrs"`
OutJson json.RawMessage `json:"out_json" form:"out_json"`
Options json.RawMessage `json:"-" form:"-"`
}
func (Inbound) MarshalFull ¶
func (Inbound) MarshalJSON ¶
MarshalJSON customizes marshalling
func (*Inbound) UnmarshalJSON ¶
type ManagedRouteRule ¶
type ManagedRouteRule struct {
Id uint `json:"id" gorm:"primaryKey;autoIncrement"`
ManagedKey string `json:"managedKey" gorm:"uniqueIndex;not null"`
EndpointTag string `json:"endpointTag" gorm:"index;not null"`
IPv4CIDR string `json:"ipv4Cidr"`
IPv6CIDR string `json:"ipv6Cidr"`
CIDRs string `json:"cidrs"`
InboundTags string `json:"inboundTags"`
}
ManagedRouteRule stores routes owned by S-UI Next. These rules are injected into the generated sing-box configuration and never mixed into the user's route JSON, so disabling a feature cannot delete a user-authored rule.
type Outbound ¶
type Outbound struct {
Id uint `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Type string `json:"type" form:"type"`
Tag string `json:"tag" form:"tag" gorm:"unique"`
Options json.RawMessage `json:"-" form:"-"`
}
func (Outbound) MarshalJSON ¶
MarshalJSON customizes marshalling
func (*Outbound) UnmarshalJSON ¶
type PasskeyCredential ¶
type Service ¶
type Service struct {
Id uint `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Type string `json:"type" form:"type"`
Tag string `json:"tag" form:"tag" gorm:"unique"`
// Foreign key to tls table
TlsId uint `json:"tls_id" form:"tls_id"`
Tls *Tls `json:"tls" form:"tls" gorm:"foreignKey:TlsId;references:Id"`
Options json.RawMessage `json:"-" form:"-"`
}
func (Service) MarshalFull ¶
func (Service) MarshalJSON ¶
MarshalJSON customizes marshalling
func (*Service) UnmarshalJSON ¶
type Stats ¶
type Stats struct {
Id uint64 `json:"id" gorm:"primaryKey;autoIncrement"`
DateTime int64 `json:"dateTime" gorm:"index:idx_stats_resource_tag_time,priority:3;index:idx_stats_time"`
Resource string `json:"resource" gorm:"index:idx_stats_resource_tag_time,priority:1"`
Tag string `json:"tag" gorm:"index:idx_stats_resource_tag_time,priority:2"`
Direction bool `json:"direction"`
Traffic int64 `json:"traffic"`
}
type Tls ¶
type Tls struct {
Id uint `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Name string `json:"name" form:"name"`
Server json.RawMessage `json:"server" form:"server"`
Client json.RawMessage `json:"client" form:"client"`
}
type Tokens ¶
type Tokens struct {
Id uint `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Desc string `json:"desc" form:"desc"`
Token string `json:"token" form:"token"`
Expiry int64 `json:"expiry" form:"expiry"`
UserId uint `json:"userId" form:"userId"`
User *User `json:"user" gorm:"foreignKey:UserId;references:Id"`
}
type User ¶
type User struct {
Id uint `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Username string `json:"username" form:"username" gorm:"uniqueIndex"`
Password string `json:"-" form:"password"`
LastLogins string `json:"lastLogin"`
TOTPSecret string `json:"-" gorm:"column:totp_secret"`
TOTPEnabled bool `json:"totpEnabled" gorm:"column:totp_enabled;default:false;not null"`
RecoveryCodes json.RawMessage `json:"-" gorm:"column:recovery_codes"`
}
Click to show internal directories.
Click to hide internal directories.