Documentation
¶
Index ¶
- type AgentCommandsRepository
- func (r *AgentCommandsRepository) Create(agentCommandHistory *models.AgentCommand) error
- func (r *AgentCommandsRepository) Delete(id uint) error
- func (r *AgentCommandsRepository) FindAll() ([]*models.AgentCommand, error)
- func (r *AgentCommandsRepository) FindById(id uint) (*models.AgentCommand, error)
- func (r *AgentCommandsRepository) GetByFilter(p util.Pagination, f []util.Filter) ([]models.AgentCommand, int64, error)
- func (r *AgentCommandsRepository) GetPendingCommandByAgentID() ([]models.AgentCommand, error)
- func (r *AgentCommandsRepository) Update(agentCommandHistory *models.AgentCommand) error
- func (r *AgentCommandsRepository) UpdateCommandStatusAndResult(agentID uint, cmdID string, status models.AgentCommandStatus, result string) error
- type AgentGroupRepository
- func (r *AgentGroupRepository) Create(agentGroup *models.AgentGroup) error
- func (r *AgentGroupRepository) Delete(id uint) (uint, error)
- func (r *AgentGroupRepository) FindById(id uint) (*models.AgentGroup, error)
- func (r *AgentGroupRepository) GetByFilter(p util.Pagination, f []util.Filter) ([]models.AgentGroup, int64, error)
- func (r *AgentGroupRepository) Update(agentGroup *models.AgentGroup) error
- type AgentMalwareRepository
- func (r *AgentMalwareRepository) CreateDetection(detection *models.AgentMalwareDetection) error
- func (r *AgentMalwareRepository) CreateExclusion(exclusion *models.AgentMalwareExclusion) error
- func (r *AgentMalwareRepository) CreateHistory(history *models.AgentMalwareHistory) error
- func (r *AgentMalwareRepository) FindAllDetectionsByAgentID(agentID uint) ([]*models.AgentMalwareDetection, error)
- func (r *AgentMalwareRepository) FindAllExclusionsByAgentID(agentID uint) ([]models.AgentMalwareExclusion, error)
- func (r *AgentMalwareRepository) FindAllHistoriesByMalwareID(malwareID uint) ([]models.AgentMalwareHistory, error)
- func (r *AgentMalwareRepository) FindDetectionByID(id uint) (*models.AgentMalwareDetection, error)
- func (r *AgentMalwareRepository) GetAgentMalwareByFilter(pageNumber, pageSize int, searchQuery string, sortBy []string, sortDesc bool) ([]models.AgentMalwareDetection, int64, error)
- func (r *AgentMalwareRepository) UpdateDetection(detection *models.AgentMalwareDetection) error
- type AgentModuleRepository
- type AgentRepository
- func (r *AgentRepository) CountAgents() (int64, error)
- func (r *AgentRepository) Create(agent *models.Agent) error
- func (r *AgentRepository) DeleteByKey(key uuid.UUID, deletedBy string) (uint, error)
- func (r *AgentRepository) GetAgentsWithCommands(p util.Pagination, f []util.Filter) ([]models.Agent, int64, error)
- func (r *AgentRepository) GetAll() ([]models.Agent, error)
- func (r *AgentRepository) GetByFilter(p util.Pagination, f []util.Filter) ([]models.Agent, int64, error)
- func (r *AgentRepository) GetByHostname(hostname string) (*models.Agent, error)
- func (r *AgentRepository) GetById(id uint) (*models.Agent, error)
- func (r *AgentRepository) GetByToken(token uuid.UUID) (*models.Agent, error)
- func (r *AgentRepository) Update(agent *models.Agent) error
- func (r *AgentRepository) UpdateAgentGroup(id uint, agentGroup uint) (models.Agent, error)
- func (r *AgentRepository) UpdateAgentType(id uint, agentType uint) (models.Agent, error)
- type CollectorRepository
- func (r *CollectorRepository) CountCollector() (int64, error)
- func (r *CollectorRepository) CreateCollector(collector *models.Collector) error
- func (r *CollectorRepository) DeleteCollectorByKey(key uuid.UUID, deletedBy string) (uint, error)
- func (r *CollectorRepository) DeleteConfigGroupByCollectorID(collectorID uint) error
- func (r *CollectorRepository) DeleteConfigsByGroupID(groupID uint) error
- func (r *CollectorRepository) GetAllCollectors() ([]models.Collector, error)
- func (r *CollectorRepository) GetByKey(key uuid.UUID) (*models.Collector, error)
- func (r *CollectorRepository) GetCollectorByFilter(p util.Pagination, f []util.Filter) ([]models.Collector, int64, error)
- func (r *CollectorRepository) GetCollectorByHostnameAndModule(hostname string, module string) ([]models.Collector, error)
- func (r *CollectorRepository) GetCollectorById(id uint) (*models.Collector, error)
- func (r *CollectorRepository) GetCollectorsHostnames() ([]string, error)
- func (r *CollectorRepository) UpdateCollector(collector *models.Collector) error
- func (r *CollectorRepository) UpdateCollectorConfig(groups []models.CollectorConfigGroup, collectorId uint) error
- func (r *CollectorRepository) UpdateCollectorConfigGroup(collectorConfigGroup *models.CollectorConfigGroup) error
- type LastSeenRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentCommandsRepository ¶
type AgentCommandsRepository struct {
// contains filtered or unexported fields
}
func NewAgentCommandsRepository ¶
func NewAgentCommandsRepository() *AgentCommandsRepository
func (*AgentCommandsRepository) Create ¶
func (r *AgentCommandsRepository) Create(agentCommandHistory *models.AgentCommand) error
func (*AgentCommandsRepository) Delete ¶
func (r *AgentCommandsRepository) Delete(id uint) error
func (*AgentCommandsRepository) FindAll ¶
func (r *AgentCommandsRepository) FindAll() ([]*models.AgentCommand, error)
func (*AgentCommandsRepository) FindById ¶
func (r *AgentCommandsRepository) FindById(id uint) (*models.AgentCommand, error)
func (*AgentCommandsRepository) GetByFilter ¶
func (r *AgentCommandsRepository) GetByFilter(p util.Pagination, f []util.Filter) ([]models.AgentCommand, int64, error)
GetByFilter GetAgentsWithFilters returns a paginated list of agents filtered by search query and sorted by provided fields
func (*AgentCommandsRepository) GetPendingCommandByAgentID ¶
func (r *AgentCommandsRepository) GetPendingCommandByAgentID() ([]models.AgentCommand, error)
func (*AgentCommandsRepository) Update ¶
func (r *AgentCommandsRepository) Update(agentCommandHistory *models.AgentCommand) error
func (*AgentCommandsRepository) UpdateCommandStatusAndResult ¶
func (r *AgentCommandsRepository) UpdateCommandStatusAndResult(agentID uint, cmdID string, status models.AgentCommandStatus, result string) error
type AgentGroupRepository ¶
type AgentGroupRepository struct {
// contains filtered or unexported fields
}
func NewAgentGroupRepository ¶
func NewAgentGroupRepository() *AgentGroupRepository
func (*AgentGroupRepository) Create ¶
func (r *AgentGroupRepository) Create(agentGroup *models.AgentGroup) error
func (*AgentGroupRepository) FindById ¶
func (r *AgentGroupRepository) FindById(id uint) (*models.AgentGroup, error)
func (*AgentGroupRepository) GetByFilter ¶
func (r *AgentGroupRepository) GetByFilter(p util.Pagination, f []util.Filter) ([]models.AgentGroup, int64, error)
GetByFilter returns a paginated list of agents filtered by search query and sorted by provided fields
func (*AgentGroupRepository) Update ¶
func (r *AgentGroupRepository) Update(agentGroup *models.AgentGroup) error
type AgentMalwareRepository ¶
type AgentMalwareRepository struct {
// contains filtered or unexported fields
}
func NewMalwareRepository ¶
func NewMalwareRepository() *AgentMalwareRepository
func (*AgentMalwareRepository) CreateDetection ¶
func (r *AgentMalwareRepository) CreateDetection(detection *models.AgentMalwareDetection) error
func (*AgentMalwareRepository) CreateExclusion ¶
func (r *AgentMalwareRepository) CreateExclusion(exclusion *models.AgentMalwareExclusion) error
func (*AgentMalwareRepository) CreateHistory ¶
func (r *AgentMalwareRepository) CreateHistory(history *models.AgentMalwareHistory) error
func (*AgentMalwareRepository) FindAllDetectionsByAgentID ¶
func (r *AgentMalwareRepository) FindAllDetectionsByAgentID(agentID uint) ([]*models.AgentMalwareDetection, error)
func (*AgentMalwareRepository) FindAllExclusionsByAgentID ¶
func (r *AgentMalwareRepository) FindAllExclusionsByAgentID(agentID uint) ([]models.AgentMalwareExclusion, error)
func (*AgentMalwareRepository) FindAllHistoriesByMalwareID ¶
func (r *AgentMalwareRepository) FindAllHistoriesByMalwareID(malwareID uint) ([]models.AgentMalwareHistory, error)
func (*AgentMalwareRepository) FindDetectionByID ¶
func (r *AgentMalwareRepository) FindDetectionByID(id uint) (*models.AgentMalwareDetection, error)
func (*AgentMalwareRepository) GetAgentMalwareByFilter ¶
func (r *AgentMalwareRepository) GetAgentMalwareByFilter(pageNumber, pageSize int, searchQuery string, sortBy []string, sortDesc bool) ([]models.AgentMalwareDetection, int64, error)
GetAgentMalwareByFilter GetByFilter GetAgentsWithFilters returns a paginated list of agents filtered by search query and sorted by provided fields
func (*AgentMalwareRepository) UpdateDetection ¶
func (r *AgentMalwareRepository) UpdateDetection(detection *models.AgentMalwareDetection) error
type AgentModuleRepository ¶
type AgentModuleRepository struct {
// contains filtered or unexported fields
}
func NewAgentModulesRepository ¶
func NewAgentModulesRepository() *AgentModuleRepository
func (*AgentModuleRepository) FindAll ¶
func (r *AgentModuleRepository) FindAll() ([]*models.AgentModule, error)
func (*AgentModuleRepository) FindByModuleId ¶
func (r *AgentModuleRepository) FindByModuleId(id uint) (*models.AgentModule, error)
func (*AgentModuleRepository) UpdateAgentModule ¶
func (r *AgentModuleRepository) UpdateAgentModule(agentModule []*models.AgentModuleConfiguration) error
type AgentRepository ¶
type AgentRepository struct {
// contains filtered or unexported fields
}
func NewAgentRepository ¶
func NewAgentRepository() *AgentRepository
func (*AgentRepository) CountAgents ¶
func (r *AgentRepository) CountAgents() (int64, error)
CountAgents returns the total number of agents
func (*AgentRepository) DeleteByKey ¶
func (*AgentRepository) GetAgentsWithCommands ¶
func (r *AgentRepository) GetAgentsWithCommands(p util.Pagination, f []util.Filter) ([]models.Agent, int64, error)
GetAgentsWithCommands returns a paginated list of agents filtered where at least one command has been executed
func (*AgentRepository) GetByFilter ¶
func (r *AgentRepository) GetByFilter(p util.Pagination, f []util.Filter) ([]models.Agent, int64, error)
GetByFilter GetAgentsWithFilters returns a paginated list of agents filtered by search query and sorted by provided fields
func (*AgentRepository) GetByHostname ¶
func (r *AgentRepository) GetByHostname(hostname string) (*models.Agent, error)
func (*AgentRepository) GetByToken ¶
func (*AgentRepository) UpdateAgentGroup ¶
func (*AgentRepository) UpdateAgentType ¶
type CollectorRepository ¶
type CollectorRepository struct {
// contains filtered or unexported fields
}
func NewCollectorRepository ¶
func NewCollectorRepository() *CollectorRepository
func (*CollectorRepository) CountCollector ¶
func (r *CollectorRepository) CountCollector() (int64, error)
CountCollector returns the total number of collectors
func (*CollectorRepository) CreateCollector ¶
func (r *CollectorRepository) CreateCollector(collector *models.Collector) error
func (*CollectorRepository) DeleteCollectorByKey ¶
func (*CollectorRepository) DeleteConfigGroupByCollectorID ¶
func (r *CollectorRepository) DeleteConfigGroupByCollectorID(collectorID uint) error
func (*CollectorRepository) DeleteConfigsByGroupID ¶
func (r *CollectorRepository) DeleteConfigsByGroupID(groupID uint) error
func (*CollectorRepository) GetAllCollectors ¶
func (r *CollectorRepository) GetAllCollectors() ([]models.Collector, error)
func (*CollectorRepository) GetCollectorByFilter ¶
func (r *CollectorRepository) GetCollectorByFilter(p util.Pagination, f []util.Filter) ([]models.Collector, int64, error)
GetCollectorByFilter returns a paginated list of collectors filtered by search query and sorted by provided fields
func (*CollectorRepository) GetCollectorByHostnameAndModule ¶
func (*CollectorRepository) GetCollectorById ¶
func (r *CollectorRepository) GetCollectorById(id uint) (*models.Collector, error)
func (*CollectorRepository) GetCollectorsHostnames ¶
func (r *CollectorRepository) GetCollectorsHostnames() ([]string, error)
func (*CollectorRepository) UpdateCollector ¶
func (r *CollectorRepository) UpdateCollector(collector *models.Collector) error
func (*CollectorRepository) UpdateCollectorConfig ¶
func (r *CollectorRepository) UpdateCollectorConfig(groups []models.CollectorConfigGroup, collectorId uint) error
func (*CollectorRepository) UpdateCollectorConfigGroup ¶
func (r *CollectorRepository) UpdateCollectorConfigGroup(collectorConfigGroup *models.CollectorConfigGroup) error
type LastSeenRepository ¶
type LastSeenRepository struct {
// contains filtered or unexported fields
}
func GetLastSeenRepository ¶
func GetLastSeenRepository() *LastSeenRepository
func (*LastSeenRepository) ChangeAgentLastSeenByKey ¶
func (r *LastSeenRepository) ChangeAgentLastSeenByKey(key string) error
func (*LastSeenRepository) GetAll ¶
func (r *LastSeenRepository) GetAll() ([]models.LastSeen, error)
func (*LastSeenRepository) GetLastSeen ¶
func (r *LastSeenRepository) GetLastSeen(key string) (models.LastSeen, error)