repository

package
v0.0.0-...-f219ead Latest Latest
Warning

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

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

Documentation

Index

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 (*AgentCommandsRepository) GetByFilter

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

func (r *AgentGroupRepository) Delete(id uint) (uint, error)

func (*AgentGroupRepository) FindById

func (r *AgentGroupRepository) FindById(id uint) (*models.AgentGroup, error)

func (*AgentGroupRepository) GetByFilter

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

func (r *AgentRepository) Create(agent *models.Agent) error

func (*AgentRepository) DeleteByKey

func (r *AgentRepository) DeleteByKey(key uuid.UUID, deletedBy string) (uint, error)

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

func (r *AgentRepository) GetAll() ([]models.Agent, error)

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

func (r *AgentRepository) GetById(id uint) (*models.Agent, error)

func (*AgentRepository) GetByToken

func (r *AgentRepository) GetByToken(token uuid.UUID) (*models.Agent, error)

func (*AgentRepository) Update

func (r *AgentRepository) Update(agent *models.Agent) error

func (*AgentRepository) UpdateAgentGroup

func (r *AgentRepository) UpdateAgentGroup(id uint, agentGroup uint) (models.Agent, error)

func (*AgentRepository) UpdateAgentType

func (r *AgentRepository) UpdateAgentType(id uint, agentType uint) (models.Agent, error)

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 (r *CollectorRepository) DeleteCollectorByKey(key uuid.UUID, deletedBy string) (uint, error)

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

func (r *CollectorRepository) GetByKey(key uuid.UUID) (*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 (r *CollectorRepository) GetCollectorByHostnameAndModule(hostname string, module string) ([]models.Collector, error)

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)

func (*LastSeenRepository) Update

func (r *LastSeenRepository) Update(lastSeen *models.LastSeen) error

Jump to

Keyboard shortcuts

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