stats

package
v1.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeClusterTrafficDailyStat

type NodeClusterTrafficDailyStat struct {
	Id                  uint64 `field:"id"`                  // ID
	ClusterId           uint32 `field:"clusterId"`           // 集群ID
	Day                 string `field:"day"`                 // YYYYMMDD
	Bytes               uint64 `field:"bytes"`               // 流量字节
	CachedBytes         uint64 `field:"cachedBytes"`         // 缓存流量
	CountRequests       uint64 `field:"countRequests"`       // 请求数
	CountCachedRequests uint64 `field:"countCachedRequests"` // 缓存的请求数
	CountAttackRequests uint64 `field:"countAttackRequests"` // 攻击请求数
	AttackBytes         uint64 `field:"attackBytes"`         // 攻击流量
}

NodeClusterTrafficDailyStat 总的流量统计(按天)

type NodeClusterTrafficDailyStatDAO

type NodeClusterTrafficDailyStatDAO dbs.DAO
var SharedNodeClusterTrafficDailyStatDAO *NodeClusterTrafficDailyStatDAO

func NewNodeClusterTrafficDailyStatDAO

func NewNodeClusterTrafficDailyStatDAO() *NodeClusterTrafficDailyStatDAO

func (*NodeClusterTrafficDailyStatDAO) CleanDays added in v1.2.1

func (this *NodeClusterTrafficDailyStatDAO) CleanDays(tx *dbs.Tx, days int) error

CleanDays 清理历史数据

func (*NodeClusterTrafficDailyStatDAO) CleanDefaultDays added in v1.2.1

func (this *NodeClusterTrafficDailyStatDAO) CleanDefaultDays(tx *dbs.Tx, defaultDays int) error

func (*NodeClusterTrafficDailyStatDAO) FindDailyStats

func (this *NodeClusterTrafficDailyStatDAO) FindDailyStats(tx *dbs.Tx, clusterId int64, dayFrom string, dayTo string) (result []*NodeClusterTrafficDailyStat, err error)

FindDailyStats 获取日期之间统计

func (*NodeClusterTrafficDailyStatDAO) IncreaseDailyStat

func (this *NodeClusterTrafficDailyStatDAO) IncreaseDailyStat(tx *dbs.Tx, clusterId int64, day string, bytes int64, cachedBytes int64, countRequests int64, countCachedRequests int64, countAttackRequests int64, attackBytes int64) error

IncreaseDailyStat 增加统计数据

func (*NodeClusterTrafficDailyStatDAO) SumDailyStat added in v1.0.0

func (this *NodeClusterTrafficDailyStatDAO) SumDailyStat(tx *dbs.Tx, clusterId int64, dayFrom string, dayTo string) (*NodeClusterTrafficDailyStat, error)

SumDailyStat 计算当月总流量

type NodeClusterTrafficDailyStatOperator

type NodeClusterTrafficDailyStatOperator struct {
	Id                  interface{} // ID
	ClusterId           interface{} // 集群ID
	Day                 interface{} // YYYYMMDD
	Bytes               interface{} // 流量字节
	CachedBytes         interface{} // 缓存流量
	CountRequests       interface{} // 请求数
	CountCachedRequests interface{} // 缓存的请求数
	CountAttackRequests interface{} // 攻击请求数
	AttackBytes         interface{} // 攻击流量
}

func NewNodeClusterTrafficDailyStatOperator

func NewNodeClusterTrafficDailyStatOperator() *NodeClusterTrafficDailyStatOperator

type NodeTrafficHourlyStat

type NodeTrafficHourlyStat struct {
	Id                  uint64 `field:"id"`                  // ID
	Role                string `field:"role"`                // 节点角色
	ClusterId           uint32 `field:"clusterId"`           // 集群ID
	NodeId              uint32 `field:"nodeId"`              // 集群ID
	Hour                string `field:"hour"`                // YYYYMMDDHH
	Bytes               uint64 `field:"bytes"`               // 流量字节
	CachedBytes         uint64 `field:"cachedBytes"`         // 缓存流量
	CountRequests       uint64 `field:"countRequests"`       // 请求数
	CountCachedRequests uint64 `field:"countCachedRequests"` // 缓存的请求数
	CountAttackRequests uint64 `field:"countAttackRequests"` // 攻击请求数
	AttackBytes         uint64 `field:"attackBytes"`         // 攻击流量
}

NodeTrafficHourlyStat 总的流量统计(按天)

type NodeTrafficHourlyStatDAO

type NodeTrafficHourlyStatDAO dbs.DAO
var SharedNodeTrafficHourlyStatDAO *NodeTrafficHourlyStatDAO

func NewNodeTrafficHourlyStatDAO

func NewNodeTrafficHourlyStatDAO() *NodeTrafficHourlyStatDAO

func (*NodeTrafficHourlyStatDAO) CleanDays added in v1.2.1

func (this *NodeTrafficHourlyStatDAO) CleanDays(tx *dbs.Tx, days int) error

CleanDays 清理历史数据

func (*NodeTrafficHourlyStatDAO) CleanDefaultDays added in v1.2.1

func (this *NodeTrafficHourlyStatDAO) CleanDefaultDays(tx *dbs.Tx, defaultDays int) error

func (*NodeTrafficHourlyStatDAO) FindHourlyStatsWithClusterId

func (this *NodeTrafficHourlyStatDAO) FindHourlyStatsWithClusterId(tx *dbs.Tx, clusterId int64, hourFrom string, hourTo string) (result []*NodeTrafficHourlyStat, err error)

FindHourlyStatsWithClusterId 获取小时之间统计

func (*NodeTrafficHourlyStatDAO) FindHourlyStatsWithNodeId

func (this *NodeTrafficHourlyStatDAO) FindHourlyStatsWithNodeId(tx *dbs.Tx, role string, nodeId int64, hourFrom string, hourTo string) (result []*NodeTrafficHourlyStat, err error)

FindHourlyStatsWithNodeId 获取节点小时之间统计

func (*NodeTrafficHourlyStatDAO) FindTopNodeStats

func (this *NodeTrafficHourlyStatDAO) FindTopNodeStats(tx *dbs.Tx, role string, hourFrom string, hourTo string, size int64) (result []*NodeTrafficHourlyStat, err error)

FindTopNodeStats 取得一定时间内的节点排行数据

func (*NodeTrafficHourlyStatDAO) FindTopNodeStatsWithAttack

func (this *NodeTrafficHourlyStatDAO) FindTopNodeStatsWithAttack(tx *dbs.Tx, role string, hourFrom string, hourTo string, size int64) (result []*NodeTrafficHourlyStat, err error)

FindTopNodeStatsWithAttack 取得防火墙相关的节点排行数据

func (*NodeTrafficHourlyStatDAO) FindTopNodeStatsWithClusterId

func (this *NodeTrafficHourlyStatDAO) FindTopNodeStatsWithClusterId(tx *dbs.Tx, role string, clusterId int64, hourFrom string, hourTo string, size int64) (result []*NodeTrafficHourlyStat, err error)

FindTopNodeStatsWithClusterId 取得集群一定时间内的节点排行数据

func (*NodeTrafficHourlyStatDAO) IncreaseHourlyStat

func (this *NodeTrafficHourlyStatDAO) IncreaseHourlyStat(tx *dbs.Tx, clusterId int64, role string, nodeId int64, hour string, bytes int64, cachedBytes int64, countRequests int64, countCachedRequests int64, countAttackRequests int64, attackBytes int64) error

IncreaseHourlyStat 增加统计数据

type NodeTrafficHourlyStatOperator

type NodeTrafficHourlyStatOperator struct {
	Id                  interface{} // ID
	Role                interface{} // 节点角色
	ClusterId           interface{} // 集群ID
	NodeId              interface{} // 集群ID
	Hour                interface{} // YYYYMMDDHH
	Bytes               interface{} // 流量字节
	CachedBytes         interface{} // 缓存流量
	CountRequests       interface{} // 请求数
	CountCachedRequests interface{} // 缓存的请求数
	CountAttackRequests interface{} // 攻击请求数
	AttackBytes         interface{} // 攻击流量
}

func NewNodeTrafficHourlyStatOperator

func NewNodeTrafficHourlyStatOperator() *NodeTrafficHourlyStatOperator

type ServerClientBrowserMonthlyStat

type ServerClientBrowserMonthlyStat struct {
	Id        uint64 `field:"id"`        // ID
	ServerId  uint32 `field:"serverId"`  // 服务ID
	BrowserId uint32 `field:"browserId"` // 浏览器ID
	Month     string `field:"month"`     // YYYYMM
	Version   string `field:"version"`   // 主版本号
	Count     uint64 `field:"count"`     // 数量
}

浏览器统计(按月)

type ServerClientBrowserMonthlyStatDAO

type ServerClientBrowserMonthlyStatDAO dbs.DAO
var SharedServerClientBrowserMonthlyStatDAO *ServerClientBrowserMonthlyStatDAO

func NewServerClientBrowserMonthlyStatDAO

func NewServerClientBrowserMonthlyStatDAO() *ServerClientBrowserMonthlyStatDAO

func (*ServerClientBrowserMonthlyStatDAO) Clean

func (this *ServerClientBrowserMonthlyStatDAO) Clean(tx *dbs.Tx) error

Clean 清理统计数据

func (*ServerClientBrowserMonthlyStatDAO) IncreaseMonthlyCount

func (this *ServerClientBrowserMonthlyStatDAO) IncreaseMonthlyCount(tx *dbs.Tx, serverId int64, browserId int64, version string, month string, count int64) error

IncreaseMonthlyCount 增加数量

func (*ServerClientBrowserMonthlyStatDAO) ListStats

func (this *ServerClientBrowserMonthlyStatDAO) ListStats(tx *dbs.Tx, serverId int64, month string, offset int64, size int64) (result []*ServerClientBrowserMonthlyStat, err error)

ListStats 查找单页数据

type ServerClientBrowserMonthlyStatOperator

type ServerClientBrowserMonthlyStatOperator struct {
	Id        interface{} // ID
	ServerId  interface{} // 服务ID
	BrowserId interface{} // 浏览器ID
	Month     interface{} // YYYYMM
	Version   interface{} // 主版本号
	Count     interface{} // 数量
}

func NewServerClientBrowserMonthlyStatOperator

func NewServerClientBrowserMonthlyStatOperator() *ServerClientBrowserMonthlyStatOperator

type ServerClientSystemMonthlyStat

type ServerClientSystemMonthlyStat struct {
	Id       uint64 `field:"id"`       // ID
	ServerId uint32 `field:"serverId"` // 服务ID
	SystemId uint32 `field:"systemId"` // 系统ID
	Version  string `field:"version"`  // 主版本号
	Month    string `field:"month"`    // YYYYMM
	Count    uint64 `field:"count"`    // 数量
}

操作系统统计(按月)

type ServerClientSystemMonthlyStatDAO

type ServerClientSystemMonthlyStatDAO dbs.DAO
var SharedServerClientSystemMonthlyStatDAO *ServerClientSystemMonthlyStatDAO

func NewServerClientSystemMonthlyStatDAO

func NewServerClientSystemMonthlyStatDAO() *ServerClientSystemMonthlyStatDAO

func (*ServerClientSystemMonthlyStatDAO) Clean

func (this *ServerClientSystemMonthlyStatDAO) Clean(tx *dbs.Tx) error

Clean 清理统计数据

func (*ServerClientSystemMonthlyStatDAO) IncreaseMonthlyCount

func (this *ServerClientSystemMonthlyStatDAO) IncreaseMonthlyCount(tx *dbs.Tx, serverId int64, systemId int64, version string, month string, count int64) error

IncreaseMonthlyCount 增加数量

func (*ServerClientSystemMonthlyStatDAO) ListStats

func (this *ServerClientSystemMonthlyStatDAO) ListStats(tx *dbs.Tx, serverId int64, month string, offset int64, size int64) (result []*ServerClientSystemMonthlyStat, err error)

ListStats 查找单页数据

type ServerClientSystemMonthlyStatOperator

type ServerClientSystemMonthlyStatOperator struct {
	Id       interface{} // ID
	ServerId interface{} // 服务ID
	SystemId interface{} // 系统ID
	Version  interface{} // 主版本号
	Month    interface{} // YYYYMM
	Count    interface{} // 数量
}

func NewServerClientSystemMonthlyStatOperator

func NewServerClientSystemMonthlyStatOperator() *ServerClientSystemMonthlyStatOperator

type ServerDomainHourlyStat

type ServerDomainHourlyStat struct {
	Id                  uint64 `field:"id"`                  // ID
	ClusterId           uint32 `field:"clusterId"`           // 集群ID
	NodeId              uint32 `field:"nodeId"`              // 节点ID
	ServerId            uint32 `field:"serverId"`            // 服务ID
	Domain              string `field:"domain"`              // 域名
	Hour                string `field:"hour"`                // YYYYMMDDHH
	Bytes               uint64 `field:"bytes"`               // 流量
	CachedBytes         uint64 `field:"cachedBytes"`         // 缓存流量
	CountRequests       uint64 `field:"countRequests"`       // 请求数
	CountCachedRequests uint64 `field:"countCachedRequests"` // 缓存请求
	CountAttackRequests uint64 `field:"countAttackRequests"` // 攻击请求数
	AttackBytes         uint64 `field:"attackBytes"`         // 攻击流量
}

ServerDomainHourlyStat 服务域名统计

type ServerDomainHourlyStatDAO

type ServerDomainHourlyStatDAO dbs.DAO
var SharedServerDomainHourlyStatDAO *ServerDomainHourlyStatDAO

func NewServerDomainHourlyStatDAO

func NewServerDomainHourlyStatDAO() *ServerDomainHourlyStatDAO

func (*ServerDomainHourlyStatDAO) CleanDays added in v1.2.1

func (this *ServerDomainHourlyStatDAO) CleanDays(tx *dbs.Tx, days int) error

CleanDays 清理历史数据

func (*ServerDomainHourlyStatDAO) CleanDefaultDays added in v1.2.1

func (this *ServerDomainHourlyStatDAO) CleanDefaultDays(tx *dbs.Tx, defaultDays int) error

func (*ServerDomainHourlyStatDAO) FindAllPartitionTables

func (this *ServerDomainHourlyStatDAO) FindAllPartitionTables() []string

FindAllPartitionTables 获取所有表格名称

func (*ServerDomainHourlyStatDAO) FindTopDomainStats

func (this *ServerDomainHourlyStatDAO) FindTopDomainStats(tx *dbs.Tx, hourFrom string, hourTo string, size int64) (result []*ServerDomainHourlyStat, resultErr error)

FindTopDomainStats 取得一定时间内的域名排行数据

func (*ServerDomainHourlyStatDAO) FindTopDomainStatsWithAttack

func (this *ServerDomainHourlyStatDAO) FindTopDomainStatsWithAttack(tx *dbs.Tx, hourFrom string, hourTo string, size int64) (result []*ServerDomainHourlyStat, resultErr error)

FindTopDomainStatsWithAttack 取得一定时间内的域名排行数据

func (*ServerDomainHourlyStatDAO) FindTopDomainStatsWithClusterId

func (this *ServerDomainHourlyStatDAO) FindTopDomainStatsWithClusterId(tx *dbs.Tx, clusterId int64, hourFrom string, hourTo string, size int64) (result []*ServerDomainHourlyStat, resultErr error)

FindTopDomainStatsWithClusterId 取得集群上的一定时间内的域名排行数据

func (*ServerDomainHourlyStatDAO) FindTopDomainStatsWithNodeId

func (this *ServerDomainHourlyStatDAO) FindTopDomainStatsWithNodeId(tx *dbs.Tx, nodeId int64, hourFrom string, hourTo string, size int64) (result []*ServerDomainHourlyStat, resultErr error)

FindTopDomainStatsWithNodeId 取得节点上的一定时间内的域名排行数据

func (*ServerDomainHourlyStatDAO) FindTopDomainStatsWithServerId

func (this *ServerDomainHourlyStatDAO) FindTopDomainStatsWithServerId(tx *dbs.Tx, serverId int64, hourFrom string, hourTo string, size int64) (result []*ServerDomainHourlyStat, resultErr error)

FindTopDomainStatsWithServerId 取得某个服务的一定时间内的域名排行数据

func (*ServerDomainHourlyStatDAO) IncreaseHourlyStat

func (this *ServerDomainHourlyStatDAO) IncreaseHourlyStat(tx *dbs.Tx, clusterId int64, nodeId int64, serverId int64, domain string, hour string, bytes int64, cachedBytes int64, countRequests int64, countCachedRequests int64, countAttackRequests int64, attackBytes int64) error

IncreaseHourlyStat 增加统计数据

func (*ServerDomainHourlyStatDAO) PartitionTable

func (this *ServerDomainHourlyStatDAO) PartitionTable(domain string) string

PartitionTable 获取分区表格名称

type ServerDomainHourlyStatOperator

type ServerDomainHourlyStatOperator struct {
	Id                  interface{} // ID
	ClusterId           interface{} // 集群ID
	NodeId              interface{} // 节点ID
	ServerId            interface{} // 服务ID
	Domain              interface{} // 域名
	Hour                interface{} // YYYYMMDDHH
	Bytes               interface{} // 流量
	CachedBytes         interface{} // 缓存流量
	CountRequests       interface{} // 请求数
	CountCachedRequests interface{} // 缓存请求
	CountAttackRequests interface{} // 攻击请求数
	AttackBytes         interface{} // 攻击流量
}

func NewServerDomainHourlyStatOperator

func NewServerDomainHourlyStatOperator() *ServerDomainHourlyStatOperator

type ServerHTTPFirewallDailyStat

type ServerHTTPFirewallDailyStat struct {
	Id                      uint64 `field:"id"`                      // ID
	ServerId                uint32 `field:"serverId"`                // 服务ID
	Day                     string `field:"day"`                     // YYYYMMDD
	HttpFirewallRuleGroupId uint32 `field:"httpFirewallRuleGroupId"` // WAF分组ID
	Action                  string `field:"action"`                  // 采取的动作
	Count                   uint64 `field:"count"`                   // 数量
}

WAF统计

type ServerHTTPFirewallDailyStatDAO

type ServerHTTPFirewallDailyStatDAO dbs.DAO
var SharedServerHTTPFirewallDailyStatDAO *ServerHTTPFirewallDailyStatDAO

func NewServerHTTPFirewallDailyStatDAO

func NewServerHTTPFirewallDailyStatDAO() *ServerHTTPFirewallDailyStatDAO

func (*ServerHTTPFirewallDailyStatDAO) Clean

func (this *ServerHTTPFirewallDailyStatDAO) Clean(tx *dbs.Tx, days int) error

Clean 清理历史数据

func (*ServerHTTPFirewallDailyStatDAO) FindDailyStats

func (this *ServerHTTPFirewallDailyStatDAO) FindDailyStats(tx *dbs.Tx, userId int64, serverId int64, actions []string, dayFrom string, dayTo string) (result []*ServerHTTPFirewallDailyStat, err error)

FindDailyStats 查询某个日期段内的记录

func (*ServerHTTPFirewallDailyStatDAO) GroupDailyCount

func (this *ServerHTTPFirewallDailyStatDAO) GroupDailyCount(tx *dbs.Tx, userId int64, serverId int64, dayFrom string, dayTo string, offset int64, size int64) (result []*ServerHTTPFirewallDailyStat, err error)

GroupDailyCount 查询规则分组数量

func (*ServerHTTPFirewallDailyStatDAO) IncreaseDailyCount

func (this *ServerHTTPFirewallDailyStatDAO) IncreaseDailyCount(tx *dbs.Tx, serverId int64, firewallRuleGroupId int64, action string, day string, count int64) error

IncreaseDailyCount 增加数量

func (*ServerHTTPFirewallDailyStatDAO) SumDailyCount

func (this *ServerHTTPFirewallDailyStatDAO) SumDailyCount(tx *dbs.Tx, userId int64, serverId int64, action string, dayFrom string, dayTo string) (int64, error)

SumDailyCount 计算某天的数据

type ServerHTTPFirewallDailyStatOperator

type ServerHTTPFirewallDailyStatOperator struct {
	Id                      interface{} // ID
	ServerId                interface{} // 服务ID
	Day                     interface{} // YYYYMMDD
	HttpFirewallRuleGroupId interface{} // WAF分组ID
	Action                  interface{} // 采取的动作
	Count                   interface{} // 数量
}

func NewServerHTTPFirewallDailyStatOperator

func NewServerHTTPFirewallDailyStatOperator() *ServerHTTPFirewallDailyStatOperator

type ServerHTTPFirewallHourlyStat

type ServerHTTPFirewallHourlyStat struct {
	Id                      uint64 `field:"id"`                      // ID
	ServerId                uint32 `field:"serverId"`                // 服务ID
	Day                     string `field:"day"`                     // YYYYMMDD
	Hour                    string `field:"hour"`                    // YYYYMMDDHH
	HttpFirewallRuleGroupId uint32 `field:"httpFirewallRuleGroupId"` // WAF分组ID
	Action                  string `field:"action"`                  // 采取的动作
	Count                   uint64 `field:"count"`                   // 数量
}

ServerHTTPFirewallHourlyStat WAF统计

type ServerHTTPFirewallHourlyStatDAO

type ServerHTTPFirewallHourlyStatDAO dbs.DAO
var SharedServerHTTPFirewallHourlyStatDAO *ServerHTTPFirewallHourlyStatDAO

func NewServerHTTPFirewallHourlyStatDAO

func NewServerHTTPFirewallHourlyStatDAO() *ServerHTTPFirewallHourlyStatDAO

func (*ServerHTTPFirewallHourlyStatDAO) Clean

func (this *ServerHTTPFirewallHourlyStatDAO) Clean(tx *dbs.Tx, days int) error

Clean 清理历史数据

func (*ServerHTTPFirewallHourlyStatDAO) FindHourlyStats

func (this *ServerHTTPFirewallHourlyStatDAO) FindHourlyStats(tx *dbs.Tx, userId int64, serverId int64, action string, hourFrom string, hourTo string) (result []*ServerHTTPFirewallHourlyStat, err error)

FindHourlyStats 查询某个日期段内的记录

func (*ServerHTTPFirewallHourlyStatDAO) GroupHourlyCount

func (this *ServerHTTPFirewallHourlyStatDAO) GroupHourlyCount(tx *dbs.Tx, userId int64, serverId int64, dayFrom string, dayTo string, offset int64, size int64) (result []*ServerHTTPFirewallHourlyStat, err error)

GroupHourlyCount 查询规则分组数量

func (*ServerHTTPFirewallHourlyStatDAO) IncreaseHourlyCount

func (this *ServerHTTPFirewallHourlyStatDAO) IncreaseHourlyCount(tx *dbs.Tx, serverId int64, firewallRuleGroupId int64, action string, hour string, count int64) error

IncreaseHourlyCount 增加数量

func (*ServerHTTPFirewallHourlyStatDAO) SumHourlyCount

func (this *ServerHTTPFirewallHourlyStatDAO) SumHourlyCount(tx *dbs.Tx, userId int64, serverId int64, action string, dayFrom string, dayTo string) (int64, error)

SumHourlyCount 计算某天的数据

type ServerHTTPFirewallHourlyStatOperator

type ServerHTTPFirewallHourlyStatOperator struct {
	Id                      interface{} // ID
	ServerId                interface{} // 服务ID
	Day                     interface{} // YYYYMMDD
	Hour                    interface{} // YYYYMMDDHH
	HttpFirewallRuleGroupId interface{} // WAF分组ID
	Action                  interface{} // 采取的动作
	Count                   interface{} // 数量
}

func NewServerHTTPFirewallHourlyStatOperator

func NewServerHTTPFirewallHourlyStatOperator() *ServerHTTPFirewallHourlyStatOperator

type ServerRegionCityMonthlyStat

type ServerRegionCityMonthlyStat struct {
	Id       uint64 `field:"id"`       // ID
	ServerId uint32 `field:"serverId"` // 服务ID
	CityId   uint32 `field:"cityId"`   // 城市ID
	Month    string `field:"month"`    // 月份YYYYMM
	Count    uint64 `field:"count"`    // 数量
}

服务用户省份分布统计(按天)

type ServerRegionCityMonthlyStatDAO

type ServerRegionCityMonthlyStatDAO dbs.DAO
var SharedServerRegionCityMonthlyStatDAO *ServerRegionCityMonthlyStatDAO

func NewServerRegionCityMonthlyStatDAO

func NewServerRegionCityMonthlyStatDAO() *ServerRegionCityMonthlyStatDAO

func (*ServerRegionCityMonthlyStatDAO) Clean

func (this *ServerRegionCityMonthlyStatDAO) Clean(tx *dbs.Tx) error

Clean 清理统计数据

func (*ServerRegionCityMonthlyStatDAO) IncreaseMonthlyCount

func (this *ServerRegionCityMonthlyStatDAO) IncreaseMonthlyCount(tx *dbs.Tx, serverId int64, cityId int64, month string, count int64) error

IncreaseMonthlyCount 增加数量

func (*ServerRegionCityMonthlyStatDAO) ListStats

func (this *ServerRegionCityMonthlyStatDAO) ListStats(tx *dbs.Tx, serverId int64, month string, countryId int64, provinceId int64, offset int64, size int64) (result []*ServerRegionCityMonthlyStat, err error)

ListStats 查找单页数据

type ServerRegionCityMonthlyStatOperator

type ServerRegionCityMonthlyStatOperator struct {
	Id       interface{} // ID
	ServerId interface{} // 服务ID
	CityId   interface{} // 城市ID
	Month    interface{} // 月份YYYYMM
	Count    interface{} // 数量
}

func NewServerRegionCityMonthlyStatOperator

func NewServerRegionCityMonthlyStatOperator() *ServerRegionCityMonthlyStatOperator

type ServerRegionCountryDailyStat

type ServerRegionCountryDailyStat struct {
	Id                  uint64 `field:"id"`                  // ID
	ServerId            uint32 `field:"serverId"`            // 服务ID
	CountryId           uint32 `field:"countryId"`           // 国家/区域ID
	Day                 string `field:"day"`                 // 日期YYYYMMDD
	CountRequests       uint64 `field:"countRequests"`       // 请求数量
	CountAttackRequests uint64 `field:"countAttackRequests"` // 攻击数量
	AttackBytes         uint64 `field:"attackBytes"`         // 攻击流量
	Bytes               uint64 `field:"bytes"`               // 总流量
}

ServerRegionCountryDailyStat 服务用户区域分布统计(按天)

type ServerRegionCountryDailyStatDAO

type ServerRegionCountryDailyStatDAO dbs.DAO
var SharedServerRegionCountryDailyStatDAO *ServerRegionCountryDailyStatDAO

func NewServerRegionCountryDailyStatDAO

func NewServerRegionCountryDailyStatDAO() *ServerRegionCountryDailyStatDAO

func (*ServerRegionCountryDailyStatDAO) Clean

func (this *ServerRegionCountryDailyStatDAO) Clean(tx *dbs.Tx) error

Clean 清理统计数据

func (*ServerRegionCountryDailyStatDAO) IncreaseDailyStat

func (this *ServerRegionCountryDailyStatDAO) IncreaseDailyStat(tx *dbs.Tx, serverId int64, countryId int64, day string, bytes int64, countRequests int64, attackBytes int64, countAttackRequests int64) error

IncreaseDailyStat 增加统计

func (*ServerRegionCountryDailyStatDAO) ListServerStats

func (this *ServerRegionCountryDailyStatDAO) ListServerStats(tx *dbs.Tx, serverId int64, day string, orderField string, offset int64, size int64) (result []*ServerRegionCountryDailyStat, err error)

ListServerStats 查找单页数据

func (*ServerRegionCountryDailyStatDAO) ListSumStats

func (this *ServerRegionCountryDailyStatDAO) ListSumStats(tx *dbs.Tx, day string, orderField string, offset int64, size int64) (result []*ServerRegionCountryDailyStat, err error)

ListSumStats 查找总体数据

func (*ServerRegionCountryDailyStatDAO) SumDailyTotalAttackRequests

func (this *ServerRegionCountryDailyStatDAO) SumDailyTotalAttackRequests(tx *dbs.Tx, day string) (int64, error)

SumDailyTotalAttackRequests 计算总攻击次数

func (*ServerRegionCountryDailyStatDAO) SumDailyTotalAttackRequestsWithServerId

func (this *ServerRegionCountryDailyStatDAO) SumDailyTotalAttackRequestsWithServerId(tx *dbs.Tx, day string, serverId int64) (int64, error)

SumDailyTotalAttackRequestsWithServerId 计算单个服务的总攻击次数

func (*ServerRegionCountryDailyStatDAO) SumDailyTotalBytes

func (this *ServerRegionCountryDailyStatDAO) SumDailyTotalBytes(tx *dbs.Tx, day string) (int64, error)

SumDailyTotalBytes 计算总流量

func (*ServerRegionCountryDailyStatDAO) SumDailyTotalBytesWithServerId

func (this *ServerRegionCountryDailyStatDAO) SumDailyTotalBytesWithServerId(tx *dbs.Tx, day string, serverId int64) (int64, error)

SumDailyTotalBytesWithServerId 计算单个服务的总流量

type ServerRegionCountryDailyStatOperator

type ServerRegionCountryDailyStatOperator struct {
	Id                  interface{} // ID
	ServerId            interface{} // 服务ID
	CountryId           interface{} // 国家/区域ID
	Day                 interface{} // 日期YYYYMMDD
	CountRequests       interface{} // 请求数量
	CountAttackRequests interface{} // 攻击数量
	AttackBytes         interface{} // 攻击流量
	Bytes               interface{} // 总流量
}

func NewServerRegionCountryDailyStatOperator

func NewServerRegionCountryDailyStatOperator() *ServerRegionCountryDailyStatOperator

type ServerRegionCountryMonthlyStat

type ServerRegionCountryMonthlyStat struct {
	Id        uint64 `field:"id"`        // ID
	ServerId  uint32 `field:"serverId"`  // 服务ID
	CountryId uint32 `field:"countryId"` // 国家/区域ID
	Month     string `field:"month"`     // 月份YYYYMM
	Count     uint64 `field:"count"`     // 数量
}

服务用户区域分布统计(按天)

type ServerRegionCountryMonthlyStatDAO

type ServerRegionCountryMonthlyStatDAO dbs.DAO
var SharedServerRegionCountryMonthlyStatDAO *ServerRegionCountryMonthlyStatDAO

func NewServerRegionCountryMonthlyStatDAO

func NewServerRegionCountryMonthlyStatDAO() *ServerRegionCountryMonthlyStatDAO

func (*ServerRegionCountryMonthlyStatDAO) Clean

func (this *ServerRegionCountryMonthlyStatDAO) Clean(tx *dbs.Tx) error

Clean 清理统计数据

func (*ServerRegionCountryMonthlyStatDAO) IncreaseMonthlyCount

func (this *ServerRegionCountryMonthlyStatDAO) IncreaseMonthlyCount(tx *dbs.Tx, serverId int64, countryId int64, month string, count int64) error

IncreaseMonthlyCount 增加数量

func (*ServerRegionCountryMonthlyStatDAO) ListStats

func (this *ServerRegionCountryMonthlyStatDAO) ListStats(tx *dbs.Tx, serverId int64, month string, offset int64, size int64) (result []*ServerRegionCountryMonthlyStat, err error)

ListStats 查找单页数据

type ServerRegionCountryMonthlyStatOperator

type ServerRegionCountryMonthlyStatOperator struct {
	Id        interface{} // ID
	ServerId  interface{} // 服务ID
	CountryId interface{} // 国家/区域ID
	Month     interface{} // 月份YYYYMM
	Count     interface{} // 数量
}

func NewServerRegionCountryMonthlyStatOperator

func NewServerRegionCountryMonthlyStatOperator() *ServerRegionCountryMonthlyStatOperator

type ServerRegionProviderMonthlyStat

type ServerRegionProviderMonthlyStat struct {
	Id         uint64 `field:"id"`         // ID
	ServerId   uint32 `field:"serverId"`   // 服务ID
	ProviderId uint32 `field:"providerId"` // 运营商ID
	Month      string `field:"month"`      // 月份YYYYMM
	Count      uint64 `field:"count"`      // 数量
}

服务用户省份分布统计(按天)

type ServerRegionProviderMonthlyStatDAO

type ServerRegionProviderMonthlyStatDAO dbs.DAO
var SharedServerRegionProviderMonthlyStatDAO *ServerRegionProviderMonthlyStatDAO

func NewServerRegionProviderMonthlyStatDAO

func NewServerRegionProviderMonthlyStatDAO() *ServerRegionProviderMonthlyStatDAO

func (*ServerRegionProviderMonthlyStatDAO) Clean

Clean 清理统计数据

func (*ServerRegionProviderMonthlyStatDAO) IncreaseMonthlyCount

func (this *ServerRegionProviderMonthlyStatDAO) IncreaseMonthlyCount(tx *dbs.Tx, serverId int64, providerId int64, month string, count int64) error

IncreaseMonthlyCount 增加数量

func (*ServerRegionProviderMonthlyStatDAO) ListStats

func (this *ServerRegionProviderMonthlyStatDAO) ListStats(tx *dbs.Tx, serverId int64, month string, offset int64, size int64) (result []*ServerRegionProviderMonthlyStat, err error)

ListStats 查找单页数据

type ServerRegionProviderMonthlyStatOperator

type ServerRegionProviderMonthlyStatOperator struct {
	Id         interface{} // ID
	ServerId   interface{} // 服务ID
	ProviderId interface{} // 运营商ID
	Month      interface{} // 月份YYYYMM
	Count      interface{} // 数量
}

func NewServerRegionProviderMonthlyStatOperator

func NewServerRegionProviderMonthlyStatOperator() *ServerRegionProviderMonthlyStatOperator

type ServerRegionProvinceMonthlyStat

type ServerRegionProvinceMonthlyStat struct {
	Id         uint64 `field:"id"`         // ID
	ServerId   uint32 `field:"serverId"`   // 服务ID
	ProvinceId uint32 `field:"provinceId"` // 省份ID
	Month      string `field:"month"`      // 月份YYYYMM
	Count      uint64 `field:"count"`      // 数量
}

服务用户省份分布统计(按天)

type ServerRegionProvinceMonthlyStatDAO

type ServerRegionProvinceMonthlyStatDAO dbs.DAO
var SharedServerRegionProvinceMonthlyStatDAO *ServerRegionProvinceMonthlyStatDAO

func NewServerRegionProvinceMonthlyStatDAO

func NewServerRegionProvinceMonthlyStatDAO() *ServerRegionProvinceMonthlyStatDAO

func (*ServerRegionProvinceMonthlyStatDAO) Clean

Clean 清理统计数据

func (*ServerRegionProvinceMonthlyStatDAO) IncreaseMonthlyCount

func (this *ServerRegionProvinceMonthlyStatDAO) IncreaseMonthlyCount(tx *dbs.Tx, serverId int64, provinceId int64, month string, count int64) error

IncreaseMonthlyCount 增加数量

func (*ServerRegionProvinceMonthlyStatDAO) ListStats

func (this *ServerRegionProvinceMonthlyStatDAO) ListStats(tx *dbs.Tx, serverId int64, month string, countryId int64, offset int64, size int64) (result []*ServerRegionProvinceMonthlyStat, err error)

ListStats 查找单页数据

type ServerRegionProvinceMonthlyStatOperator

type ServerRegionProvinceMonthlyStatOperator struct {
	Id         interface{} // ID
	ServerId   interface{} // 服务ID
	ProvinceId interface{} // 省份ID
	Month      interface{} // 月份YYYYMM
	Count      interface{} // 数量
}

func NewServerRegionProvinceMonthlyStatOperator

func NewServerRegionProvinceMonthlyStatOperator() *ServerRegionProvinceMonthlyStatOperator

type TrafficDailyStat

type TrafficDailyStat struct {
	Id                  uint64 `field:"id"`                  // ID
	Day                 string `field:"day"`                 // YYYYMMDD
	CachedBytes         uint64 `field:"cachedBytes"`         // 缓存流量
	Bytes               uint64 `field:"bytes"`               // 流量字节
	CountRequests       uint64 `field:"countRequests"`       // 请求数
	CountCachedRequests uint64 `field:"countCachedRequests"` // 缓存请求数
	CountAttackRequests uint64 `field:"countAttackRequests"` // 攻击量
	AttackBytes         uint64 `field:"attackBytes"`         // 攻击流量
}

TrafficDailyStat 总的流量统计(按天)

type TrafficDailyStatDAO

type TrafficDailyStatDAO dbs.DAO
var SharedTrafficDailyStatDAO *TrafficDailyStatDAO

func NewTrafficDailyStatDAO

func NewTrafficDailyStatDAO() *TrafficDailyStatDAO

func (*TrafficDailyStatDAO) CleanDays added in v1.2.1

func (this *TrafficDailyStatDAO) CleanDays(tx *dbs.Tx, days int) error

CleanDays 清理历史数据

func (*TrafficDailyStatDAO) CleanDefaultDays added in v1.2.1

func (this *TrafficDailyStatDAO) CleanDefaultDays(tx *dbs.Tx, defaultDays int) error

func (*TrafficDailyStatDAO) FindDailyStat

func (this *TrafficDailyStatDAO) FindDailyStat(tx *dbs.Tx, day string) (*TrafficDailyStat, error)

FindDailyStat 查找某天的统计

func (*TrafficDailyStatDAO) FindDailyStats

func (this *TrafficDailyStatDAO) FindDailyStats(tx *dbs.Tx, dayFrom string, dayTo string) (result []*TrafficDailyStat, err error)

FindDailyStats 获取日期之间统计

func (*TrafficDailyStatDAO) IncreaseDailyStat

func (this *TrafficDailyStatDAO) IncreaseDailyStat(tx *dbs.Tx, day string, bytes int64, cachedBytes int64, countRequests int64, countCachedRequests int64, countAttackRequests int64, attackBytes int64) error

IncreaseDailyStat 增加统计数据

type TrafficDailyStatOperator

type TrafficDailyStatOperator struct {
	Id                  interface{} // ID
	Day                 interface{} // YYYYMMDD
	CachedBytes         interface{} // 缓存流量
	Bytes               interface{} // 流量字节
	CountRequests       interface{} // 请求数
	CountCachedRequests interface{} // 缓存请求数
	CountAttackRequests interface{} // 攻击量
	AttackBytes         interface{} // 攻击流量
}

func NewTrafficDailyStatOperator

func NewTrafficDailyStatOperator() *TrafficDailyStatOperator

type TrafficHourlyStat

type TrafficHourlyStat struct {
	Id                  uint64 `field:"id"`                  // ID
	Hour                string `field:"hour"`                // YYYYMMDDHH
	Bytes               uint64 `field:"bytes"`               // 流量字节
	CachedBytes         uint64 `field:"cachedBytes"`         // 缓存流量
	CountRequests       uint64 `field:"countRequests"`       // 请求数
	CountCachedRequests uint64 `field:"countCachedRequests"` // 缓存请求数
	CountAttackRequests uint64 `field:"countAttackRequests"` // 攻击数
	AttackBytes         uint64 `field:"attackBytes"`         // 攻击流量
}

TrafficHourlyStat 总的流量统计(按小时)

type TrafficHourlyStatDAO

type TrafficHourlyStatDAO dbs.DAO
var SharedTrafficHourlyStatDAO *TrafficHourlyStatDAO

func NewTrafficHourlyStatDAO

func NewTrafficHourlyStatDAO() *TrafficHourlyStatDAO

func (*TrafficHourlyStatDAO) CleanDays added in v1.2.1

func (this *TrafficHourlyStatDAO) CleanDays(tx *dbs.Tx, days int) error

CleanDays 清理历史数据

func (*TrafficHourlyStatDAO) CleanDefaultDays added in v1.2.1

func (this *TrafficHourlyStatDAO) CleanDefaultDays(tx *dbs.Tx, defaultDays int) error

func (*TrafficHourlyStatDAO) FindHourlyStat

func (this *TrafficHourlyStatDAO) FindHourlyStat(tx *dbs.Tx, hour string) (*TrafficHourlyStat, error)

FindHourlyStat 查FindHourlyStat 找单个小时的统计

func (*TrafficHourlyStatDAO) FindHourlyStats

func (this *TrafficHourlyStatDAO) FindHourlyStats(tx *dbs.Tx, hourFrom string, hourTo string) (result []*TrafficHourlyStat, err error)

FindHourlyStats 获取小时之间统计

func (*TrafficHourlyStatDAO) IncreaseHourlyStat

func (this *TrafficHourlyStatDAO) IncreaseHourlyStat(tx *dbs.Tx, hour string, bytes int64, cachedBytes int64, countRequests int64, countCachedRequests int64, countAttackRequests int64, attackBytes int64) error

IncreaseHourlyStat 增加流量

func (*TrafficHourlyStatDAO) SumHourlyStats

func (this *TrafficHourlyStatDAO) SumHourlyStats(tx *dbs.Tx, hourFrom string, hourTo string) (*TrafficHourlyStat, error)

SumHourlyStats 计算多个小时的统计总和

type TrafficHourlyStatOperator

type TrafficHourlyStatOperator struct {
	Id                  interface{} // ID
	Hour                interface{} // YYYYMMDDHH
	Bytes               interface{} // 流量字节
	CachedBytes         interface{} // 缓存流量
	CountRequests       interface{} // 请求数
	CountCachedRequests interface{} // 缓存请求数
	CountAttackRequests interface{} // 攻击数
	AttackBytes         interface{} // 攻击流量
}

func NewTrafficHourlyStatOperator

func NewTrafficHourlyStatOperator() *TrafficHourlyStatOperator

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL