Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2020 Changes in this version + const SortAsc + const SortDesc + var ErrorDBUnavailable = errors.New("database is not available") + func AddHook(hook *Hook) + func BSONArrayBytes(data []byte) (interface{}, error) + func BSONDecode(value interface{}) (interface{}, error) + func ChangeDB() + func SetupDB() + type AccessLogDAOInterface interface + FindAccessLogCookie func(day string, logId string) (*accesslogs.AccessLog, error) + FindRequestHeaderAndBody func(day string, logId string) (*accesslogs.AccessLog, error) + FindResponseHeaderAndBody func(day string, logId string) (*accesslogs.AccessLog, error) + GroupWAFRuleGroups func(day string, wafId string) ([]maps.Map, error) + HasAccessLog func(day string, serverId string) (bool, error) + HasAccessLogWithWAF func(day string, wafId string) (bool, error) + HasNextAccessLog func(day string, serverId string, fromId string, onlyErrors bool, searchIP string) (bool, error) + HasNextAccessLogWithWAF func(day string, wafId string, fromId string, onlyErrors bool, searchIP string) (bool, error) + Init func() + InsertAccessLogs func(accessLogList []interface{}) error + InsertOne func(accessLog *accesslogs.AccessLog) error + ListAccessLogs func(day string, serverId string, fromId string, onlyErrors bool, searchIP string, ...) ([]*accesslogs.AccessLog, error) + ListAccessLogsWithWAF func(day string, wafId string, fromId string, onlyErrors bool, searchIP string, ...) ([]*accesslogs.AccessLog, error) + ListLatestAccessLogs func(day string, serverId string, fromId string, onlyErrors bool, size int) ([]*accesslogs.AccessLog, error) + ListTopAccessLogs func(day string, size int) ([]*accesslogs.AccessLog, error) + QueryAccessLogs func(day string, serverId string, query *Query) ([]*accesslogs.AccessLog, error) + SetDriver func(driver DriverInterface) + TableName func(day string) string + func AccessLogDAO() AccessLogDAOInterface + type AgentLogDAOInterface interface + DropAgentTable func(agentId string) error + FindLatestTaskLog func(agentId string, taskId string) (*agents.ProcessLog, error) + FindLatestTaskLogs func(agentId string, taskId string, fromId string, size int) ([]*agents.ProcessLog, error) + Init func() + InsertOne func(agentId string, log *agents.ProcessLog) error + SetDriver func(driver DriverInterface) + func AgentLogDAO() AgentLogDAOInterface + type AgentValueDAOInterface interface + ClearItemValues func(agentId string, appId string, itemId string, level notices.NoticeLevel) error + DropAgentTable func(agentId string) error + FindLatestItemValue func(agentId string, appId string, itemId string) (*agents.Value, error) + FindLatestItemValueNoError func(agentId string, appId string, itemId string) (*agents.Value, error) + FindLatestItemValues func(agentId string, appId string, itemId string, noticeLevel notices.NoticeLevel, ...) ([]*agents.Value, error) + GroupValuesByTime func(query *Query, timeField string, result map[string]Expr) ([]*agents.Value, error) + Init func() + Insert func(agentId string, value *agents.Value) error + ListItemValues func(agentId string, appId string, itemId string, noticeLevel notices.NoticeLevel, ...) ([]*agents.Value, error) + QueryValues func(query *Query) ([]*agents.Value, error) + SetDriver func(driver DriverInterface) + TableName func(agentId string) string + func AgentValueDAO() AgentValueDAOInterface + type AuditLogDAOInterface interface + CountAllAuditLogs func() (int64, error) + Init func() + InsertOne func(auditLog *audits.Log) error + ListAuditLogs func(offset int, size int) ([]*audits.Log, error) + SetDriver func(driver DriverInterface) + func AuditLogDAO() AuditLogDAOInterface + type AvgExpr struct + Field string + func NewAvgExpr(field string) *AvgExpr + type BaseDAO struct + func (this *BaseDAO) SetDriver(driver DriverInterface) + type BaseDriver struct + func (this *BaseDriver) IsAvailable() bool + func (this *BaseDriver) SetIsAvailable(b bool) + type DriverInterface interface + Avg func(query *Query, field string) (float64, error) + Count func(query *Query) (int64, error) + DeleteOnes func(query *Query) error + DropTable func(table string) error + FindOne func(query *Query, modelPtr interface{}) (interface{}, error) + FindOnes func(query *Query, modelPtr interface{}) ([]interface{}, error) + Group func(query *Query, field string, result map[string]Expr) ([]maps.Map, error) + Init func() + InsertOne func(table string, modelPtr interface{}) error + InsertOnes func(table string, modelPtrSlice interface{}) error + IsAvailable func() bool + ListTables func() ([]string, error) + Max func(query *Query, field string) (float64, error) + Min func(query *Query, field string) (float64, error) + SetIsAvailable func(b bool) + Shutdown func() error + StatTables func(tables []string) (map[string]*TableStat, error) + Sum func(query *Query, field string) (float64, error) + Test func() error + func SharedDB() DriverInterface + type Expr interface + type Hook struct + Setup func() + type MaxExpr struct + Field string + func NewMaxExpr(field string) *MaxExpr + type MinExpr struct + Field string + func NewMinExpr(field string) *MinExpr + type MongoAccessLogDAO struct + func (this *MongoAccessLogDAO) FindAccessLogCookie(day string, logId string) (*accesslogs.AccessLog, error) + func (this *MongoAccessLogDAO) FindRequestHeaderAndBody(day string, logId string) (*accesslogs.AccessLog, error) + func (this *MongoAccessLogDAO) FindResponseHeaderAndBody(day string, logId string) (*accesslogs.AccessLog, error) + func (this *MongoAccessLogDAO) GroupWAFRuleGroups(day string, wafId string) ([]maps.Map, error) + func (this *MongoAccessLogDAO) HasAccessLog(day string, serverId string) (bool, error) + func (this *MongoAccessLogDAO) HasAccessLogWithWAF(day string, wafId string) (bool, error) + func (this *MongoAccessLogDAO) HasNextAccessLog(day string, serverId string, fromId string, onlyErrors bool, searchIP string) (bool, error) + func (this *MongoAccessLogDAO) HasNextAccessLogWithWAF(day string, wafId string, fromId string, onlyErrors bool, searchIP string) (bool, error) + func (this *MongoAccessLogDAO) Init() + func (this *MongoAccessLogDAO) InsertAccessLogs(accessLogList []interface{}) error + func (this *MongoAccessLogDAO) InsertOne(accessLog *accesslogs.AccessLog) error + func (this *MongoAccessLogDAO) InsertingTableName(day string) string + func (this *MongoAccessLogDAO) ListAccessLogs(day string, serverId string, fromId string, onlyErrors bool, searchIP string, ...) ([]*accesslogs.AccessLog, error) + func (this *MongoAccessLogDAO) ListAccessLogsWithWAF(day string, wafId string, fromId string, onlyErrors bool, searchIP string, ...) ([]*accesslogs.AccessLog, error) + func (this *MongoAccessLogDAO) ListLatestAccessLogs(day string, serverId string, fromId string, onlyErrors bool, size int) ([]*accesslogs.AccessLog, error) + func (this *MongoAccessLogDAO) ListTopAccessLogs(day string, size int) ([]*accesslogs.AccessLog, error) + func (this *MongoAccessLogDAO) QueryAccessLogs(day string, serverId string, query *Query) ([]*accesslogs.AccessLog, error) + func (this *MongoAccessLogDAO) TableName(day string) string + type MongoAgentLogDAO struct + func (this *MongoAgentLogDAO) DropAgentTable(agentId string) error + func (this *MongoAgentLogDAO) FindLatestTaskLog(agentId string, taskId string) (*agents.ProcessLog, error) + func (this *MongoAgentLogDAO) FindLatestTaskLogs(agentId string, taskId string, fromId string, size int) ([]*agents.ProcessLog, error) + func (this *MongoAgentLogDAO) Init() + func (this *MongoAgentLogDAO) InsertOne(agentId string, log *agents.ProcessLog) error + func (this *MongoAgentLogDAO) TableName(agentId string) string + type MongoAgentValueDAO struct + func (this *MongoAgentValueDAO) ClearItemValues(agentId string, appId string, itemId string, level notices.NoticeLevel) error + func (this *MongoAgentValueDAO) DropAgentTable(agentId string) error + func (this *MongoAgentValueDAO) FindLatestItemValue(agentId string, appId string, itemId string) (*agents.Value, error) + func (this *MongoAgentValueDAO) FindLatestItemValueNoError(agentId string, appId string, itemId string) (*agents.Value, error) + func (this *MongoAgentValueDAO) FindLatestItemValues(agentId string, appId string, itemId string, noticeLevel notices.NoticeLevel, ...) ([]*agents.Value, error) + func (this *MongoAgentValueDAO) GroupValuesByTime(query *Query, timeField string, result map[string]Expr) ([]*agents.Value, error) + func (this *MongoAgentValueDAO) Init() + func (this *MongoAgentValueDAO) Insert(agentId string, value *agents.Value) error + func (this *MongoAgentValueDAO) ListItemValues(agentId string, appId string, itemId string, noticeLevel notices.NoticeLevel, ...) ([]*agents.Value, error) + func (this *MongoAgentValueDAO) QueryValues(query *Query) ([]*agents.Value, error) + func (this *MongoAgentValueDAO) TableName(agentId string) string + type MongoAuditLogDAO struct + func (this *MongoAuditLogDAO) CountAllAuditLogs() (int64, error) + func (this *MongoAuditLogDAO) Init() + func (this *MongoAuditLogDAO) InsertOne(auditLog *audits.Log) error + func (this *MongoAuditLogDAO) ListAuditLogs(offset int, size int) ([]*audits.Log, error) + type MongoCollection struct + func (this *MongoCollection) CreateIndex(fields ...*shared.IndexField) error + func (this *MongoCollection) CreateIndexes(fields ...[]*shared.IndexField) error + type MongoDriver struct + func (this *MongoDriver) Avg(query *Query, field string) (float64, error) + func (this *MongoDriver) Count(query *Query) (int64, error) + func (this *MongoDriver) DB() *mongo.Database + func (this *MongoDriver) DeleteOnes(query *Query) error + func (this *MongoDriver) DropTable(table string) error + func (this *MongoDriver) FindOne(query *Query, modelPtr interface{}) (interface{}, error) + func (this *MongoDriver) FindOnes(query *Query, modelPtr interface{}) ([]interface{}, error) + func (this *MongoDriver) Group(query *Query, field string, result map[string]Expr) ([]maps.Map, error) + func (this *MongoDriver) Init() + func (this *MongoDriver) InsertOne(table string, modelPtr interface{}) error + func (this *MongoDriver) InsertOnes(table string, modelPtrSlice interface{}) error + func (this *MongoDriver) ListTables() ([]string, error) + func (this *MongoDriver) Max(query *Query, field string) (float64, error) + func (this *MongoDriver) Min(query *Query, field string) (float64, error) + func (this *MongoDriver) SelectColl(name string) (*MongoCollection, error) + func (this *MongoDriver) Shutdown() error + func (this *MongoDriver) StatTables(tables []string) (map[string]*TableStat, error) + func (this *MongoDriver) Sum(query *Query, field string) (float64, error) + func (this *MongoDriver) Test() error + func (this *MongoDriver) TestConfig(config *db.MongoConfig) (message string, ok bool) + type MongoNoticeDAO struct + func (this *MongoNoticeDAO) CountAllReadNotices() (int, error) + func (this *MongoNoticeDAO) CountAllUnreadNotices() (int, error) + func (this *MongoNoticeDAO) CountReadNoticesForAgent(agentId string) (int, error) + func (this *MongoNoticeDAO) CountReceivedNotices(receiverId string, cond map[string]interface{}, minutes int) (int, error) + func (this *MongoNoticeDAO) CountUnreadNoticesForAgent(agentId string) (int, error) + func (this *MongoNoticeDAO) DeleteNoticesForAgent(agentId string) error + func (this *MongoNoticeDAO) ExistNoticesWithHash(hash string, cond map[string]interface{}, duration time.Duration) (bool, error) + func (this *MongoNoticeDAO) Init() + func (this *MongoNoticeDAO) InsertOne(notice *notices.Notice) error + func (this *MongoNoticeDAO) ListAgentNotices(agentId string, isRead bool, offset int, size int) ([]*notices.Notice, error) + func (this *MongoNoticeDAO) ListNotices(isRead bool, offset int, size int) ([]*notices.Notice, error) + func (this *MongoNoticeDAO) NotifyProxyMessage(cond notices.ProxyCond, message string) error + func (this *MongoNoticeDAO) NotifyProxyServerMessage(serverId string, level notices.NoticeLevel, message string) error + func (this *MongoNoticeDAO) TableName() string + func (this *MongoNoticeDAO) UpdateAgentNoticesRead(agentId string, noticeIds []string) error + func (this *MongoNoticeDAO) UpdateAllAgentNoticesRead(agentId string) error + func (this *MongoNoticeDAO) UpdateAllNoticesRead() error + func (this *MongoNoticeDAO) UpdateNoticeReceivers(noticeId string, receiverIds []string) error + func (this *MongoNoticeDAO) UpdateNoticesRead(noticeIds []string) error + type MongoServerValueDAO struct + func (this *MongoServerValueDAO) CreateIndex(serverId string, fields []*shared.IndexField) error + func (this *MongoServerValueDAO) DeleteExpiredValues(serverId string, period stats.ValuePeriod, life int) error + func (this *MongoServerValueDAO) DropServerTable(serverId string) error + func (this *MongoServerValueDAO) FindOneWithItem(serverId string, item string) (*stats.Value, error) + func (this *MongoServerValueDAO) FindSameItemValue(serverId string, item *stats.Value) (*stats.Value, error) + func (this *MongoServerValueDAO) Init() + func (this *MongoServerValueDAO) InsertOne(serverId string, value *stats.Value) error + func (this *MongoServerValueDAO) QueryValues(query *Query) ([]*stats.Value, error) + func (this *MongoServerValueDAO) TableName(serverId string) string + func (this *MongoServerValueDAO) UpdateItemValueAndTimestamp(serverId string, valueId string, value map[string]interface{}, timestamp int64) error + type MySQLDriver struct + func (this *MySQLDriver) CheckTableExists(table string) (bool, error) + func (this *MySQLDriver) CreateTable(table string, definitionSQL string) error + func (this *MySQLDriver) Init() + func (this *MySQLDriver) ListTables() ([]string, error) + func (this *MySQLDriver) StatTables(tables []string) (map[string]*TableStat, error) + func (this *MySQLDriver) TestDSN(dsn string, autoCreateDB bool) (message string, ok bool) + type NoticeDAOInterface interface + CountAllReadNotices func() (int, error) + CountAllUnreadNotices func() (int, error) + CountReadNoticesForAgent func(agentId string) (int, error) + CountReceivedNotices func(receiverId string, cond map[string]interface{}, minutes int) (int, error) + CountUnreadNoticesForAgent func(agentId string) (int, error) + DeleteNoticesForAgent func(agentId string) error + ExistNoticesWithHash func(hash string, cond map[string]interface{}, duration time.Duration) (bool, error) + Init func() + InsertOne func(notice *notices.Notice) error + ListAgentNotices func(agentId string, isRead bool, offset int, size int) ([]*notices.Notice, error) + ListNotices func(isRead bool, offset int, size int) ([]*notices.Notice, error) + NotifyProxyMessage func(cond notices.ProxyCond, message string) error + NotifyProxyServerMessage func(serverId string, level notices.NoticeLevel, message string) error + SetDriver func(driver DriverInterface) + UpdateAgentNoticesRead func(agentId string, noticeIds []string) error + UpdateAllAgentNoticesRead func(agentId string) error + UpdateAllNoticesRead func() error + UpdateNoticeReceivers func(noticeId string, receiverIds []string) error + UpdateNoticesRead func(noticeIds []string) error + func NoticeDAO() NoticeDAOInterface + type Operand struct + Code OperandCode + Value interface{} + func NewOperand(code OperandCode, value interface{}) *Operand + type OperandCode = string + const OperandEq + const OperandGt + const OperandGte + const OperandIn + const OperandLt + const OperandLte + const OperandNeq + const OperandNotIn + const OperandOr + type OperandList struct + func NewOperandList() *OperandList + func (this *OperandList) Add(field string, operand ...*Operand) *OperandList + func (this *OperandList) Len() int + func (this *OperandList) Range(f func(field string, operands []*Operand)) + type PostgresDriver struct + func (this *PostgresDriver) CheckTableExists(table string) (bool, error) + func (this *PostgresDriver) CreateTable(table string, definitionSQL string) error + func (this *PostgresDriver) Init() + func (this *PostgresDriver) ListTables() ([]string, error) + func (this *PostgresDriver) StatTables(tables []string) (map[string]*TableStat, error) + func (this *PostgresDriver) TestDSN(dsn string, autoCreateDB bool) (message string, ok bool) + type Query struct + func NewQuery(table string) *Query + func (this *Query) Asc(field string) *Query + func (this *Query) Attr(field string, value interface{}) *Query + func (this *Query) Avg(field string) (float64, error) + func (this *Query) Count() (int64, error) + func (this *Query) Debug() *Query + func (this *Query) Delete() error + func (this *Query) Desc(field string) *Query + func (this *Query) FieldMap(mapping func(field string) string) *Query + func (this *Query) FindOne(modelPtr interface{}) (interface{}, error) + func (this *Query) FindOnes(modelPtr interface{}) ([]interface{}, error) + func (this *Query) Group(field string, result map[string]Expr) ([]maps.Map, error) + func (this *Query) Gt(field string, value interface{}) *Query + func (this *Query) Gte(field string, value interface{}) *Query + func (this *Query) Init() *Query + func (this *Query) InsertOne(modelPtr interface{}) error + func (this *Query) InsertOnes(modelPtrSlice interface{}) error + func (this *Query) Limit(size int) *Query + func (this *Query) Lt(field string, value interface{}) *Query + func (this *Query) Lte(field string, value interface{}) *Query + func (this *Query) Max(field string) (float64, error) + func (this *Query) Min(field string) (float64, error) + func (this *Query) Node() *Query + func (this *Query) Not(field string, value interface{}) *Query + func (this *Query) Offset(offset int) *Query + func (this *Query) Op(field string, operandCode OperandCode, value interface{}) *Query + func (this *Query) Or(fieldValues []*OperandList) *Query + func (this *Query) Result(field ...string) *Query + func (this *Query) Sum(field string) (float64, error) + func (this *Query) Table(table string) *Query + func (this *Query) Timeout(timeout time.Duration) *Query + type SQLAccessLogDAO struct + func (this *SQLAccessLogDAO) FindAccessLogCookie(day string, logId string) (*accesslogs.AccessLog, error) + func (this *SQLAccessLogDAO) FindRequestHeaderAndBody(day string, logId string) (*accesslogs.AccessLog, error) + func (this *SQLAccessLogDAO) FindResponseHeaderAndBody(day string, logId string) (*accesslogs.AccessLog, error) + func (this *SQLAccessLogDAO) GroupWAFRuleGroups(day string, wafId string) ([]maps.Map, error) + func (this *SQLAccessLogDAO) HasAccessLog(day string, serverId string) (bool, error) + func (this *SQLAccessLogDAO) HasAccessLogWithWAF(day string, wafId string) (bool, error) + func (this *SQLAccessLogDAO) HasNextAccessLog(day string, serverId string, fromId string, onlyErrors bool, searchIP string) (bool, error) + func (this *SQLAccessLogDAO) HasNextAccessLogWithWAF(day string, wafId string, fromId string, onlyErrors bool, searchIP string) (bool, error) + func (this *SQLAccessLogDAO) Init() + func (this *SQLAccessLogDAO) InsertAccessLogs(accessLogList []interface{}) error + func (this *SQLAccessLogDAO) InsertOne(accessLog *accesslogs.AccessLog) error + func (this *SQLAccessLogDAO) ListAccessLogs(day string, serverId string, fromId string, onlyErrors bool, searchIP string, ...) ([]*accesslogs.AccessLog, error) + func (this *SQLAccessLogDAO) ListAccessLogsWithWAF(day string, wafId string, fromId string, onlyErrors bool, searchIP string, ...) ([]*accesslogs.AccessLog, error) + func (this *SQLAccessLogDAO) ListLatestAccessLogs(day string, serverId string, fromId string, onlyErrors bool, size int) ([]*accesslogs.AccessLog, error) + func (this *SQLAccessLogDAO) ListTopAccessLogs(day string, size int) ([]*accesslogs.AccessLog, error) + func (this *SQLAccessLogDAO) QueryAccessLogs(day string, serverId string, query *Query) ([]*accesslogs.AccessLog, error) + func (this *SQLAccessLogDAO) TableName(day string) string + func (this *SQLAccessLogDAO) TodayTableName() string + type SQLAction = int + const SQLDelete + const SQLInsert + const SQLSelect + const SQLUpdate + type SQLAgentLogDAO struct + func (this *SQLAgentLogDAO) DropAgentTable(agentId string) error + func (this *SQLAgentLogDAO) FindLatestTaskLog(agentId string, taskId string) (*agents.ProcessLog, error) + func (this *SQLAgentLogDAO) FindLatestTaskLogs(agentId string, taskId string, fromId string, size int) ([]*agents.ProcessLog, error) + func (this *SQLAgentLogDAO) Init() + func (this *SQLAgentLogDAO) InsertOne(agentId string, log *agents.ProcessLog) error + func (this *SQLAgentLogDAO) TableName(agentId string) string + type SQLAgentValueDAO struct + func (this *SQLAgentValueDAO) ClearItemValues(agentId string, appId string, itemId string, level notices.NoticeLevel) error + func (this *SQLAgentValueDAO) DropAgentTable(agentId string) error + func (this *SQLAgentValueDAO) FindLatestItemValue(agentId string, appId string, itemId string) (*agents.Value, error) + func (this *SQLAgentValueDAO) FindLatestItemValueNoError(agentId string, appId string, itemId string) (*agents.Value, error) + func (this *SQLAgentValueDAO) FindLatestItemValues(agentId string, appId string, itemId string, noticeLevel notices.NoticeLevel, ...) ([]*agents.Value, error) + func (this *SQLAgentValueDAO) GroupValuesByTime(query *Query, timeField string, result map[string]Expr) ([]*agents.Value, error) + func (this *SQLAgentValueDAO) Init() + func (this *SQLAgentValueDAO) Insert(agentId string, value *agents.Value) error + func (this *SQLAgentValueDAO) ListItemValues(agentId string, appId string, itemId string, noticeLevel notices.NoticeLevel, ...) ([]*agents.Value, error) + func (this *SQLAgentValueDAO) QueryValues(query *Query) ([]*agents.Value, error) + func (this *SQLAgentValueDAO) TableName(agentId string) string + type SQLAuditLogDAO struct + func (this *SQLAuditLogDAO) CountAllAuditLogs() (int64, error) + func (this *SQLAuditLogDAO) Init() + func (this *SQLAuditLogDAO) InsertOne(auditLog *audits.Log) error + func (this *SQLAuditLogDAO) ListAuditLogs(offset int, size int) ([]*audits.Log, error) + func (this *SQLAuditLogDAO) TableName() string + type SQLCond struct + Expr string + Params map[string]interface{} + type SQLDriver struct + func (this *SQLDriver) Avg(query *Query, field string) (float64, error) + func (this *SQLDriver) Count(query *Query) (int64, error) + func (this *SQLDriver) DeleteOnes(query *Query) error + func (this *SQLDriver) DropTable(table string) error + func (this *SQLDriver) FindOne(query *Query, modelPtr interface{}) (interface{}, error) + func (this *SQLDriver) FindOnes(query *Query, modelPtr interface{}) ([]interface{}, error) + func (this *SQLDriver) Group(query *Query, groupField string, result map[string]Expr) ([]maps.Map, error) + func (this *SQLDriver) InsertOne(table string, modelPtr interface{}) error + func (this *SQLDriver) InsertOnes(table string, modelPtrSlice interface{}) error + func (this *SQLDriver) JSONExtract(field string, path string) string + func (this *SQLDriver) JSONExtractNumeric(field string, path string) string + func (this *SQLDriver) Max(query *Query, field string) (float64, error) + func (this *SQLDriver) Min(query *Query, field string) (float64, error) + func (this *SQLDriver) Shutdown() error + func (this *SQLDriver) Sum(query *Query, field string) (float64, error) + func (this *SQLDriver) Test() error + func (this *SQLDriver) UpdateOnes(query *Query, values map[string]interface{}) error + type SQLDriverInterface interface + CreateTable func(table string, definitionSQL string) error + JSONExtract func(field string, path string) string + UpdateOnes func(query *Query, values map[string]interface{}) error + type SQLNoticeDAO struct + func (this *SQLNoticeDAO) CountAllReadNotices() (int, error) + func (this *SQLNoticeDAO) CountAllUnreadNotices() (int, error) + func (this *SQLNoticeDAO) CountReadNoticesForAgent(agentId string) (int, error) + func (this *SQLNoticeDAO) CountReceivedNotices(receiverId string, cond map[string]interface{}, minutes int) (int, error) + func (this *SQLNoticeDAO) CountUnreadNoticesForAgent(agentId string) (int, error) + func (this *SQLNoticeDAO) DeleteNoticesForAgent(agentId string) error + func (this *SQLNoticeDAO) ExistNoticesWithHash(hash string, cond map[string]interface{}, duration time.Duration) (bool, error) + func (this *SQLNoticeDAO) Init() + func (this *SQLNoticeDAO) InsertOne(notice *notices.Notice) error + func (this *SQLNoticeDAO) ListAgentNotices(agentId string, isRead bool, offset int, size int) ([]*notices.Notice, error) + func (this *SQLNoticeDAO) ListNotices(isRead bool, offset int, size int) ([]*notices.Notice, error) + func (this *SQLNoticeDAO) NotifyProxyMessage(cond notices.ProxyCond, message string) error + func (this *SQLNoticeDAO) NotifyProxyServerMessage(serverId string, level notices.NoticeLevel, message string) error + func (this *SQLNoticeDAO) TableName() string + func (this *SQLNoticeDAO) UpdateAgentNoticesRead(agentId string, noticeIds []string) error + func (this *SQLNoticeDAO) UpdateAllAgentNoticesRead(agentId string) error + func (this *SQLNoticeDAO) UpdateAllNoticesRead() error + func (this *SQLNoticeDAO) UpdateNoticeReceivers(noticeId string, receiverIds []string) error + func (this *SQLNoticeDAO) UpdateNoticesRead(noticeIds []string) error + type SQLParamsHolder struct + Args []interface{} + Params map[string]interface{} + func NewSQLParamsHolder(driver string) *SQLParamsHolder + func (this *SQLParamsHolder) Add(value interface{}) (holder string) + func (this *SQLParamsHolder) AddHolder(holder string, value interface{}) + func (this *SQLParamsHolder) AddSlice(s interface{}) (holder string) + func (this *SQLParamsHolder) Parse(sqlString string) string + type SQLServerValueDAO struct + func (this *SQLServerValueDAO) CreateIndex(serverId string, fields []*shared.IndexField) error + func (this *SQLServerValueDAO) DeleteExpiredValues(serverId string, period stats.ValuePeriod, life int) error + func (this *SQLServerValueDAO) DropServerTable(serverId string) error + func (this *SQLServerValueDAO) FindOneWithItem(serverId string, item string) (*stats.Value, error) + func (this *SQLServerValueDAO) FindSameItemValue(serverId string, item *stats.Value) (*stats.Value, error) + func (this *SQLServerValueDAO) Init() + func (this *SQLServerValueDAO) InsertOne(serverId string, value *stats.Value) error + func (this *SQLServerValueDAO) QueryValues(query *Query) ([]*stats.Value, error) + func (this *SQLServerValueDAO) TableName(serverId string) string + func (this *SQLServerValueDAO) UpdateItemValueAndTimestamp(serverId string, valueId string, value map[string]interface{}, timestamp int64) error + type ServerValueDAOInterface interface + CreateIndex func(serverId string, fields []*shared.IndexField) error + DeleteExpiredValues func(serverId string, period stats.ValuePeriod, life int) error + DropServerTable func(serverId string) error + FindOneWithItem func(serverId string, item string) (*stats.Value, error) + FindSameItemValue func(serverId string, item *stats.Value) (*stats.Value, error) + Init func() + InsertOne func(serverId string, value *stats.Value) error + QueryValues func(query *Query) ([]*stats.Value, error) + SetDriver func(driver DriverInterface) + TableName func(serverId string) string + UpdateItemValueAndTimestamp func(serverId string, valueId string, value map[string]interface{}, timestamp int64) error + func ServerValueDAO() ServerValueDAOInterface + type SortField struct + Name string + Type SortType + func (this *SortField) IsAsc() bool + func (this *SortField) IsDesc() bool + type SortType = string + type SumExpr struct + Field string + func NewSumExpr(field string) *SumExpr + type TableStat struct + Count int64 + FormattedSize string + Size int64