service

package
v0.0.0-...-e40cc08 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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) Create

func (s *AgentService) Create(agent *models.Agent) error

func (*AgentService) Delete

func (s *AgentService) Delete(key uuid.UUID, deletedBy string) (uint, error)

func (*AgentService) FindAll

func (s *AgentService) FindAll() ([]models.Agent, error)

func (*AgentService) FindByHostname

func (s *AgentService) FindByHostname(hostname string) (*models.Agent, error)

func (*AgentService) FindByID

func (s *AgentService) FindByID(id uint) (*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) Update

func (s *AgentService) Update(agent *models.Agent) error

func (*AgentService) UpdateAgentGroup

func (s *AgentService) UpdateAgentGroup(id uint, agentGroup uint) (models.Agent, error)

func (*AgentService) UpdateAgentType

func (s *AgentService) UpdateAgentType(id uint, agentType uint) (models.Agent, error)

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) Delete

func (s *CollectorService) Delete(key uuid.UUID, deletedBy string) (uint, error)

func (*CollectorService) FinByID

func (s *CollectorService) FinByID(id uint) (*models.Collector, error)

func (*CollectorService) FindAll

func (s *CollectorService) FindAll() ([]models.Collector, error)

func (*CollectorService) GetByKey

func (s *CollectorService) GetByKey(token string) (*models.Collector, error)

func (*CollectorService) GetCollectorByHostnameAndModule

func (s *CollectorService) GetCollectorByHostnameAndModule(hostname string, module string) ([]models.Collector, error)

func (*CollectorService) GetCollectorLastSeen

func (s *CollectorService) GetCollectorLastSeen(collector models.Collector) (models.LastSeen, error)

func (*CollectorService) GetCollectorStatus

func (s *CollectorService) GetCollectorStatus(collector models.Collector) (models.Status, string)

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

func (*CollectorService) Update

func (s *CollectorService) Update(collector *models.Collector) error

type LastSeenService

type LastSeenService struct {
	// contains filtered or unexported fields
}

func NewLastSeenService

func NewLastSeenService() *LastSeenService

func (*LastSeenService) Get

func (s *LastSeenService) Get(key string) (models.LastSeen, error)

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) Set

func (s *LastSeenService) Set(key string, lastSeen time.Time) error

func (*LastSeenService) Start

func (s *LastSeenService) Start()

func (*LastSeenService) Stop

func (s *LastSeenService) Stop()

Jump to

Keyboard shortcuts

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