MCPcopy Create free account
hub / github.com/PasarGuard/node / GetUserStats

Method GetUserStats

backend/xray/api/stats.go:104–114  ·  view source on GitHub ↗
(ctx context.Context, email string, reset bool)

Source from the content-addressed store, hash-verified

102}
103
104func (x *XrayHandler) GetUserStats(ctx context.Context, email string, reset bool) (*common.StatResponse, error) {
105 if email == "" {
106 return nil, errors.New("email required")
107 }
108 resp, err := x.QueryStats(ctx, fmt.Sprintf("user>>>%s>>>", email), reset)
109 if err != nil {
110 return nil, err
111 }
112
113 return buildStatResponse(resp.GetStat()), nil
114}
115
116func (x *XrayHandler) GetInboundStats(ctx context.Context, tag string, reset bool) (*common.StatResponse, error) {
117 if tag == "" {

Callers 1

GetStatsMethod · 0.80

Calls 2

QueryStatsMethod · 0.95
buildStatResponseFunction · 0.85

Tested by

no test coverage detected