Documentation
¶
Index ¶
- func FilterExperimentalNodesForClient(list []*UserSubscribeInfo, userAgent string)
- type Subscribe
- type SubscribeCatalog
- type SubscribeCategory
- type SubscribeDiscount
- type SubscribePriceOption
- type SubscribeRepo
- type SubscribeUseCase
- func (uc *SubscribeUseCase) QuerySubscribeCatalog(ctx context.Context, language string) (*SubscribeCatalog, error)
- func (uc *SubscribeUseCase) QuerySubscribeList(ctx context.Context, language string, categoryID int64) ([]*Subscribe, int32, error)
- func (uc *SubscribeUseCase) QueryUserSubscribeNodeList(ctx context.Context, userID int64) ([]*UserSubscribeInfo, error)
- type TrafficLimit
- type UserSubscribeInfo
- type UserSubscribeNodeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterExperimentalNodesForClient ¶
func FilterExperimentalNodesForClient(list []*UserSubscribeInfo, userAgent string)
FilterExperimentalNodesForClient 按客户端 User-Agent 过滤实验性协议节点。 simnet/omniflow 等新协议仅对自有客户端/SDK(UA 命中 omnxt、slag 或 slaglab)放行, 其它客户端(含开源客户端、空 UA、未知 UA)一律剔除,避免下发无法使用的配置。
Types ¶
type Subscribe ¶
type Subscribe struct {
ID int64
Name string
Language string
Description string
ShortDescription string
Features string
DetailFormat string
DetailContent string
UnitPrice int64
UnitTime string
Discount []*SubscribeDiscount
Replacement int64
Inventory int64
Traffic int64
SpeedLimit int64
DeviceLimit int64
Quota int64
CategoryID int64
CategoryName string
Nodes []int
NodeTags []string
NodeGroupIds []int64
NodeGroupId int64
TrafficLimit []*TrafficLimit
Show bool
Sell bool
Sort int64
DeductionRatio int64
AllowDeduction bool
ResetCycle int64
RenewalReset bool
ShowOriginalPrice bool
PriceOptions []SubscribePriceOption
CreatedAt int64
UpdatedAt int64
}
Subscribe 订阅信息
type SubscribeCatalog ¶ added in v1.0.9
type SubscribeCatalog struct {
Categories []*SubscribeCategory
Uncategorized []*Subscribe
Total int32
}
type SubscribeCategory ¶ added in v1.0.9
type SubscribeDiscount ¶
SubscribeDiscount 订阅折扣
type SubscribePriceOption ¶ added in v1.0.10
type SubscribeRepo ¶
type SubscribeRepo interface {
// QuerySubscribeList 查询订阅列表
QuerySubscribeList(ctx context.Context, language string, categoryID int64) ([]*Subscribe, int32, error)
QuerySubscribeCatalog(ctx context.Context, language string) (*SubscribeCatalog, error)
QueryUserSubscribeNodeList(ctx context.Context, userID int64) ([]*UserSubscribeInfo, error)
}
SubscribeRepo Public Subscribe数据仓库接口
type SubscribeUseCase ¶
type SubscribeUseCase struct {
// contains filtered or unexported fields
}
SubscribeUseCase Public Subscribe用例
func NewSubscribeUseCase ¶
func NewSubscribeUseCase(repo SubscribeRepo) *SubscribeUseCase
NewSubscribeUseCase 创建Public Subscribe用例
func (*SubscribeUseCase) QuerySubscribeCatalog ¶ added in v1.0.9
func (uc *SubscribeUseCase) QuerySubscribeCatalog(ctx context.Context, language string) (*SubscribeCatalog, error)
func (*SubscribeUseCase) QuerySubscribeList ¶
func (uc *SubscribeUseCase) QuerySubscribeList(ctx context.Context, language string, categoryID int64) ([]*Subscribe, int32, error)
QuerySubscribeList 查询订阅列表
func (*SubscribeUseCase) QueryUserSubscribeNodeList ¶
func (uc *SubscribeUseCase) QueryUserSubscribeNodeList(ctx context.Context, userID int64) ([]*UserSubscribeInfo, error)
type TrafficLimit ¶
type UserSubscribeInfo ¶
type UserSubscribeNodeInfo ¶
type UserSubscribeNodeInfo struct {
ID int64
Name string
Uuid string
Protocol string
Protocols string
Port uint32
Address string
Tags []string
Country string
City string
Longitude string
Latitude string
LatitudeCenter string
LongitudeCenter string
CreatedAt int64
SNI string
OmniflowCarrier string
OmniflowPath string
OmniflowContentType string
OmniflowProfileJson string
OmniflowCaCertPath string
OmniflowTargetMeta string
OmniflowSpkiPin string
OmniflowAdaptiveTlsEnabled bool
OmniflowTlsFingerprint string
OmniflowSniMode string
OmniflowPaddingMode string
OmniflowAfEnabled bool
OmniflowAfPathMode string
OmniflowAfPathPrefix string
OmniflowAfPathSuffix string
OmniflowAfPathRotationSecs int
OmniflowAfPathSkewSlots int
}
Click to show internal directories.
Click to hide internal directories.