Documentation ¶
Index ¶
- type AgentCommandService
- func (s *AgentCommandService) Create(agent *models.AgentCommand) error
- func (s *AgentCommandService) FindAll() ([]*models.AgentCommand, error)
- func (s *AgentCommandService) FindByID(id uint) (*models.AgentCommand, error)
- func (s *AgentCommandService) GetPendingCommands() ([]models.AgentCommand, error)
- func (s *AgentCommandService) ListAgentCommands(p util.Pagination, f []util.Filter) ([]models.AgentCommand, int64, error)
- func (s *AgentCommandService) Update(agent *models.AgentCommand) error
- func (s *AgentCommandService) UpdateCommandStatusAndResult(agentID uint, cmdID string, status models.AgentCommandStatus, result string) error
- type AgentGroupService
- func (s *AgentGroupService) CreateGroup(agent *models.AgentGroup) error
- func (s *AgentGroupService) DeleteGroup(id uint) (uint, error)
- func (s *AgentGroupService) ListAgentsGroups(p util.Pagination, f []util.Filter) ([]models.AgentGroup, int64, error)
- func (s *AgentGroupService) UpdateGroup(agent *models.AgentGroup) error
- type AgentMalwareService
- func (s *AgentMalwareService) ChangeMalwareStatus(malwareID int64, status models.MalwareStatus, changedBy string) error
- func (s *AgentMalwareService) CreateNewMalwareEntry(detection models.AgentMalwareDetection) error
- func (s *AgentMalwareService) GetAgentExclusions(agentID int64) ([]models.AgentMalwareExclusion, error)
- func (s *AgentMalwareService) ListAgentMalware(pageNumber, pageSize int, searchQuery string, sortBy []string, sortDesc bool) ([]models.AgentMalwareDetection, int, error)
- func (s *AgentMalwareService) ListAgentMalwareHistory(malwareId uint) ([]models.AgentMalwareHistory, error)
- type AgentModuleService
- type AgentService
- func (s *AgentService) Create(agent *models.Agent) error
- func (s *AgentService) Delete(key uuid.UUID, deletedBy string) (uint, error)
- func (s *AgentService) FindAll() ([]models.Agent, error)
- func (s *AgentService) FindByHostname(hostname string) (*models.Agent, error)
- func (s *AgentService) FindByID(id uint) (*models.Agent, error)
- func (s *AgentService) FindByToken(token string) (*models.Agent, error)
- func (s *AgentService) ListAgentWithCommands(p util.Pagination, f []util.Filter) ([]models.Agent, int64, error)
- func (s *AgentService) ListAgents(p util.Pagination, f []util.Filter) ([]models.Agent, int64, error)
- func (s *AgentService) Update(agent *models.Agent) error
- func (s *AgentService) UpdateAgentGroup(id uint, agentGroup uint) (models.Agent, error)
- func (s *AgentService) UpdateAgentType(id uint, agentType uint) (models.Agent, error)
- type CollectorService
- func (s *CollectorService) Create(collector *models.Collector) error
- func (s *CollectorService) Delete(key uuid.UUID, deletedBy string) (uint, error)
- func (s *CollectorService) FinByID(id uint) (*models.Collector, error)
- func (s *CollectorService) FindAll() ([]models.Collector, error)
- func (s *CollectorService) GetByKey(token string) (*models.Collector, error)
- func (s *CollectorService) GetCollectorByHostnameAndModule(hostname string, module string) ([]models.Collector, error)
- func (s *CollectorService) GetCollectorLastSeen(collector models.Collector) (models.LastSeen, error)
- func (s *CollectorService) GetCollectorStatus(collector models.Collector) (models.Status, string)
- func (s *CollectorService) GetHostnames(p util.Pagination, f []util.Filter) ([]string, int64, error)
- func (s *CollectorService) ListCollectors(p util.Pagination, f []util.Filter) ([]models.Collector, int64, error)
- func (s *CollectorService) SaveCollectorConfigs(groups []models.CollectorConfigGroup, collectorId uint) error
- func (s *CollectorService) Update(collector *models.Collector) error
- type LastSeenService
- func (s *LastSeenService) Get(key string) (models.LastSeen, error)
- func (s *LastSeenService) GetLastSeen(key string) (models.LastSeen, error)
- func (s *LastSeenService) GetStatus(key string) (models.Status, string)
- func (s *LastSeenService) Populate(lastPings []models.LastSeen)
- func (s *LastSeenService) Set(key string, lastSeen time.Time) error
- func (s *LastSeenService) Start()
- func (s *LastSeenService) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentCommandService ¶
type AgentCommandService struct {
// contains filtered or unexported fields
}
func NewAgentCommandService ¶
func NewAgentCommandService() *AgentCommandService
func (*AgentCommandService) Create ¶
func (s *AgentCommandService) Create(agent *models.AgentCommand) error
func (*AgentCommandService) FindAll ¶
func (s *AgentCommandService) FindAll() ([]*models.AgentCommand, error)
func (*AgentCommandService) FindByID ¶
func (s *AgentCommandService) FindByID(id uint) (*models.AgentCommand, error)
func (*AgentCommandService) GetPendingCommands ¶
func (s *AgentCommandService) GetPendingCommands() ([]models.AgentCommand, error)
func (*AgentCommandService) ListAgentCommands ¶
func (s *AgentCommandService) ListAgentCommands(p util.Pagination, f []util.Filter) ([]models.AgentCommand, int64, error)
ListAgentCommands retrieves a paginated list of agents commands based on the provided search criteria.
func (*AgentCommandService) Update ¶
func (s *AgentCommandService) Update(agent *models.AgentCommand) error
func (*AgentCommandService) UpdateCommandStatusAndResult ¶
func (s *AgentCommandService) UpdateCommandStatusAndResult(agentID uint, cmdID string, status models.AgentCommandStatus, result string) error
type AgentGroupService ¶
type AgentGroupService struct {
// contains filtered or unexported fields
}
func NewAgentGroupService ¶
func NewAgentGroupService() *AgentGroupService
func (*AgentGroupService) CreateGroup ¶
func (s *AgentGroupService) CreateGroup(agent *models.AgentGroup) error
func (*AgentGroupService) DeleteGroup ¶
func (s *AgentGroupService) DeleteGroup(id uint) (uint, error)
func (*AgentGroupService) ListAgentsGroups ¶
func (s *AgentGroupService) ListAgentsGroups(p util.Pagination, f []util.Filter) ([]models.AgentGroup, int64, error)
ListAgentsGroups retrieves a paginated list of agents based on the provided search criteria.
func (*AgentGroupService) UpdateGroup ¶
func (s *AgentGroupService) UpdateGroup(agent *models.AgentGroup) error
type AgentMalwareService ¶
type AgentMalwareService struct {
// contains filtered or unexported fields
}
func NewAgentMalwareService ¶
func NewAgentMalwareService() *AgentMalwareService
func (*AgentMalwareService) ChangeMalwareStatus ¶
func (s *AgentMalwareService) ChangeMalwareStatus(malwareID int64, status models.MalwareStatus, changedBy string) error
func (*AgentMalwareService) CreateNewMalwareEntry ¶
func (s *AgentMalwareService) CreateNewMalwareEntry(detection models.AgentMalwareDetection) error
func (*AgentMalwareService) GetAgentExclusions ¶
func (s *AgentMalwareService) GetAgentExclusions(agentID int64) ([]models.AgentMalwareExclusion, error)
func (*AgentMalwareService) ListAgentMalware ¶
func (s *AgentMalwareService) ListAgentMalware(pageNumber, pageSize int, searchQuery string, sortBy []string, sortDesc bool) ([]models.AgentMalwareDetection, int, error)
func (*AgentMalwareService) ListAgentMalwareHistory ¶
func (s *AgentMalwareService) ListAgentMalwareHistory(malwareId uint) ([]models.AgentMalwareHistory, error)
type AgentModuleService ¶
type AgentModuleService struct {
// contains filtered or unexported fields
}
func NewAgentModuleService ¶
func NewAgentModuleService() *AgentModuleService
func (*AgentModuleService) FindAll ¶
func (s *AgentModuleService) FindAll() ([]*models.AgentModule, error)
func (*AgentModuleService) FindByID ¶
func (s *AgentModuleService) FindByID(id uint) (*models.AgentModule, error)
func (*AgentModuleService) UpdateModuleConfig ¶
func (s *AgentModuleService) UpdateModuleConfig(configs []*models.AgentModuleConfiguration) error
type AgentService ¶
type AgentService struct {
// contains filtered or unexported fields
}
func NewAgentService ¶
func NewAgentService(lastSeenService *LastSeenService) *AgentService
func (*AgentService) FindByHostname ¶
func (s *AgentService) FindByHostname(hostname string) (*models.Agent, error)
func (*AgentService) FindByToken ¶
func (s *AgentService) FindByToken(token string) (*models.Agent, error)
func (*AgentService) ListAgentWithCommands ¶
func (s *AgentService) ListAgentWithCommands(p util.Pagination, f []util.Filter) ([]models.Agent, int64, error)
ListAgentWithCommands retrieves a paginated list of agents with commands based on the provided search criteria.
func (*AgentService) ListAgents ¶
func (s *AgentService) ListAgents(p util.Pagination, f []util.Filter) ([]models.Agent, int64, error)
ListAgents retrieves a paginated list of agents based on the provided search criteria.
func (*AgentService) UpdateAgentGroup ¶
func (*AgentService) UpdateAgentType ¶
type CollectorService ¶
type CollectorService struct {
// contains filtered or unexported fields
}
func NewCollectorService ¶
func NewCollectorService(lastSeenService *LastSeenService) *CollectorService
func (*CollectorService) Create ¶
func (s *CollectorService) Create(collector *models.Collector) error
func (*CollectorService) FinByID ¶
func (s *CollectorService) FinByID(id uint) (*models.Collector, error)
func (*CollectorService) GetByKey ¶
func (s *CollectorService) GetByKey(token string) (*models.Collector, error)
func (*CollectorService) GetCollectorByHostnameAndModule ¶
func (*CollectorService) GetCollectorLastSeen ¶
func (*CollectorService) GetCollectorStatus ¶
func (*CollectorService) GetHostnames ¶
func (s *CollectorService) GetHostnames(p util.Pagination, f []util.Filter) ([]string, int64, error)
func (*CollectorService) ListCollectors ¶
func (s *CollectorService) ListCollectors(p util.Pagination, f []util.Filter) ([]models.Collector, int64, error)
ListCollectors retrieves a paginated list of collectors based on the provided search criteria.
func (*CollectorService) SaveCollectorConfigs ¶
func (s *CollectorService) SaveCollectorConfigs(groups []models.CollectorConfigGroup, collectorId uint) error
type LastSeenService ¶
type LastSeenService struct {
// contains filtered or unexported fields
}
func NewLastSeenService ¶
func NewLastSeenService() *LastSeenService
func (*LastSeenService) GetLastSeen ¶
func (s *LastSeenService) GetLastSeen(key string) (models.LastSeen, error)
func (*LastSeenService) GetStatus ¶
func (s *LastSeenService) GetStatus(key string) (models.Status, string)
func (*LastSeenService) Populate ¶
func (s *LastSeenService) Populate(lastPings []models.LastSeen)
func (*LastSeenService) Start ¶
func (s *LastSeenService) Start()
func (*LastSeenService) Stop ¶
func (s *LastSeenService) Stop()
Click to show internal directories.
Click to hide internal directories.