models

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	OS      string
	Version string
	Status  string
	Count   int
}

type Antivirus

type Antivirus struct {
	ID        string
	Hostname  string
	OS        string
	Name      string
	IsActive  bool `sql:"is_active"`
	IsUpdated bool `sql:"is_updated"`
	SiteID    int
}

type App

type App struct {
	ID        int
	Source    string
	Name      string
	Publisher string
	Count     int
}

type Computer

type Computer struct {
	ID           string
	Hostname     string
	OS           string
	Version      string
	IP           string
	MAC          string
	Username     string
	Manufacturer string
	Model        string
	Serial       string
	IsRemote     bool      `sql:"is_remote"`
	LastContact  time.Time `sql:"last_contact"`
	Tags         []*ent.Tag
	SiteID       int
}

type GeneralSettings

type GeneralSettings struct {
	ID                       int
	Country                  string
	MaxUploadSize            string
	UserCertYears            int
	NATSTimeout              int
	Refresh                  int
	SessionLifetime          int
	UpdateChannel            string
	AgentFrequency           int
	RequestVNCPIN            bool
	Tag                      int
	WinGetFrequency          int
	UseWinget                bool
	UseFlatpak               bool
	UseBrew                  bool
	SFTPDisabled             bool
	RemoteAssistanceDisabled bool
	DetectRemoteAgents       bool
	AutoAdmitAgents          bool
}

type Model

type Model struct {
	Client *ent.Client
}

func New

func New(dbUrl string, driverName, domain string) (*Model, error)

func (*Model) AddAdmittedTag

func (m *Model) AddAdmittedTag(settingsId int, tag int) error

func (*Model) AddImportedUser

func (m *Model) AddImportedUser(uid, name, email, phone, country string) error

func (*Model) AddProfile

func (m *Model) AddProfile(siteID int, description string) (*ent.Profile, error)

func (*Model) AddSite added in v0.7.0

func (m *Model) AddSite(tenantID int, name string, isDefault bool, domain string) error

func (*Model) AddTagToAgent

func (m *Model) AddTagToAgent(agentId, tagId string, c *partials.CommonInfo) error

func (*Model) AddTagToProfile

func (m *Model) AddTagToProfile(profileId int, tagId int) error

func (*Model) AddTaskToProfile

func (m *Model) AddTaskToProfile(c echo.Context, profileID int, cfg TaskConfig) error

func (*Model) AddTenant added in v0.7.0

func (m *Model) AddTenant(name string, isDefault bool, siteName string) error

func (*Model) AddUser

func (m *Model) AddUser(uid, name, email, phone, country string) error

func (*Model) AgentsExists

func (m *Model) AgentsExists(c *partials.CommonInfo) (bool, error)

func (*Model) ApplyGlobalSettings added in v0.7.0

func (m *Model) ApplyGlobalSettings(tenantID int) error

func (*Model) AssociateAgentsToDefaultTenantAndSite added in v0.7.0

func (m *Model) AssociateAgentsToDefaultTenantAndSite() error

func (*Model) AssociateDefaultSiteToAgents added in v0.7.0

func (m *Model) AssociateDefaultSiteToAgents(site *ent.Site) error

func (*Model) AssociateDomainToDefaultSite added in v0.7.0

func (m *Model) AssociateDomainToDefaultSite(domain string) error

func (*Model) AssociateMetadataToDefaultTenant added in v0.7.0

func (m *Model) AssociateMetadataToDefaultTenant() error

func (*Model) AssociateProfilesToDefaultTenantAndSite added in v0.7.0

func (m *Model) AssociateProfilesToDefaultTenantAndSite() error

func (*Model) AssociateTagsToDefaultTenant added in v0.7.0

func (m *Model) AssociateTagsToDefaultTenant() error

func (*Model) AssociateToTenantAndSite added in v0.7.0

func (m *Model) AssociateToTenantAndSite(agentID string, newTenant, newSite string) error

func (*Model) CloneGlobalSettings added in v0.7.0

func (m *Model) CloneGlobalSettings(tenantID int) error

func (*Model) Close

func (m *Model) Close() error

func (*Model) ConfirmEmail

func (m *Model) ConfirmEmail(uid string) error

func (*Model) ConfirmLogIn

func (m *Model) ConfirmLogIn(uid string) error

func (*Model) CountAgentApps

func (m *Model) CountAgentApps(agentId string, f filters.ApplicationsFilter, c *partials.CommonInfo) (int, error)

func (*Model) CountAgentsByOS

func (m *Model) CountAgentsByOS(c *partials.CommonInfo) ([]Agent, error)

func (*Model) CountAgentsByOSVersion

func (m *Model) CountAgentsByOSVersion(c *partials.CommonInfo) ([]Agent, error)

func (*Model) CountAgentsNotReportedLast24h

func (m *Model) CountAgentsNotReportedLast24h(c *partials.CommonInfo) (int, error)

func (*Model) CountAgentsReportedLast24h

func (m *Model) CountAgentsReportedLast24h(c *partials.CommonInfo) (int, error)

func (*Model) CountAllAgents

func (m *Model) CountAllAgents(f filters.AgentFilter, excludeWaitingForAdmissionAgents bool, c *partials.CommonInfo) (int, error)

func (*Model) CountAllAntiviri

func (m *Model) CountAllAntiviri(f filters.AntivirusFilter, c *partials.CommonInfo) (int, error)

func (*Model) CountAllApps

func (m *Model) CountAllApps(f filters.ApplicationsFilter, c *partials.CommonInfo) (int, error)

func (*Model) CountAllCertificates

func (m *Model) CountAllCertificates(f filters.CertificateFilter) (int, error)

func (*Model) CountAllComputers

func (m *Model) CountAllComputers(f filters.AgentFilter, c *partials.CommonInfo) (int, error)

func (*Model) CountAllDeployments

func (m *Model) CountAllDeployments(c *partials.CommonInfo) (int, error)

func (*Model) CountAllOSUsernames

func (m *Model) CountAllOSUsernames(c *partials.CommonInfo) (int, error)

func (*Model) CountAllOrgMetadata

func (m *Model) CountAllOrgMetadata(c *partials.CommonInfo) (int, error)

func (*Model) CountAllProfileIssues

func (m *Model) CountAllProfileIssues(profileID int) (int, error)

func (*Model) CountAllProfiles

func (m *Model) CountAllProfiles(c *partials.CommonInfo) (int, error)

func (*Model) CountAllSessions

func (m *Model) CountAllSessions() (int, error)

func (*Model) CountAllSites added in v0.7.0

func (m *Model) CountAllSites(f filters.SiteFilter, tenantID string) (int, error)

func (*Model) CountAllSystemUpdates

func (m *Model) CountAllSystemUpdates(f filters.SystemUpdatesFilter, c *partials.CommonInfo) (int, error)

func (*Model) CountAllTags

func (m *Model) CountAllTags(c *partials.CommonInfo) (int, error)

func (*Model) CountAllTasksForProfile

func (m *Model) CountAllTasksForProfile(profileID int, c *partials.CommonInfo) (int, error)

func (*Model) CountAllTenants added in v0.7.0

func (m *Model) CountAllTenants(f filters.TenantFilter) (int, error)

func (*Model) CountAllUpdateAgents

func (m *Model) CountAllUpdateAgents(f filters.UpdateAgentsFilter, c *partials.CommonInfo) (int, error)

func (*Model) CountAllUpdateServers

func (m *Model) CountAllUpdateServers(f filters.UpdateServersFilter) (int, error)

func (*Model) CountAllUsers

func (m *Model) CountAllUsers(f filters.UserFilter) (int, error)

func (*Model) CountCertificatesAboutToexpire

func (m *Model) CountCertificatesAboutToexpire() (int, error)

func (*Model) CountDeploymentsForAgent

func (m *Model) CountDeploymentsForAgent(agentId string, c *partials.CommonInfo) (int, error)

func (*Model) CountDifferentPrinters

func (m *Model) CountDifferentPrinters(c *partials.CommonInfo) (int, error)

func (*Model) CountDifferentVendor

func (m *Model) CountDifferentVendor(c *partials.CommonInfo) (int, error)

func (*Model) CountDisabledAgents

func (m *Model) CountDisabledAgents(c *partials.CommonInfo) (int, error)

func (*Model) CountDisabledAntivirusAgents

func (m *Model) CountDisabledAntivirusAgents(c *partials.CommonInfo) (int, error)

func (*Model) CountLatestUpdates

func (m *Model) CountLatestUpdates(agentId string, c *partials.CommonInfo) (int, error)

func (*Model) CountMetadataForAgent

func (m *Model) CountMetadataForAgent(agentId string, c *partials.CommonInfo) (int, error)

func (*Model) CountNoAutoupdateAgents

func (m *Model) CountNoAutoupdateAgents(c *partials.CommonInfo) (int, error)

func (*Model) CountOutdatedAgents

func (m *Model) CountOutdatedAgents() (int, error)

func (*Model) CountOutdatedAntivirusDatabaseAgents

func (m *Model) CountOutdatedAntivirusDatabaseAgents(c *partials.CommonInfo) (int, error)

func (*Model) CountPendingUpdateAgents

func (m *Model) CountPendingUpdateAgents(c *partials.CommonInfo) (int, error)

func (*Model) CountSites added in v0.7.0

func (m *Model) CountSites(tenantID int) (int, error)

func (*Model) CountTenants added in v0.7.0

func (m *Model) CountTenants() (int, error)

func (*Model) CountUpgradableAgents

func (m *Model) CountUpgradableAgents(version string) (int, error)

func (*Model) CountVNCSupportedAgents

func (m *Model) CountVNCSupportedAgents(c *partials.CommonInfo) (int, error)

func (*Model) CountWaitingForAdmissionAgents

func (m *Model) CountWaitingForAdmissionAgents(c *partials.CommonInfo) (int, error)

func (*Model) CreateDefaultSite added in v0.7.0

func (m *Model) CreateDefaultSite(tenant *ent.Tenant) (*ent.Site, error)

func (*Model) CreateDefaultTenant added in v0.7.0

func (m *Model) CreateDefaultTenant() (*ent.Tenant, error)

func (*Model) CreateDefaultTenantAndSite added in v0.7.0

func (m *Model) CreateDefaultTenantAndSite() error

func (*Model) CreateInitialSettings

func (m *Model) CreateInitialSettings() error

func (*Model) DeleteAgent

func (m *Model) DeleteAgent(agentId string, c *partials.CommonInfo) error

func (*Model) DeleteAllAgents

func (m *Model) DeleteAllAgents(c *partials.CommonInfo) (int, error)

func (*Model) DeleteCertificate

func (m *Model) DeleteCertificate(serial int64) error

func (*Model) DeleteOrgMetadata

func (m *Model) DeleteOrgMetadata(id int, c *partials.CommonInfo) error

func (*Model) DeleteProfile

func (m *Model) DeleteProfile(profileId int, c *partials.CommonInfo) error

func (*Model) DeleteServer

func (m *Model) DeleteServer(serverId int) error

func (*Model) DeleteSession

func (m *Model) DeleteSession(token string) error

func (*Model) DeleteSite added in v0.7.0

func (m *Model) DeleteSite(tenantID int, siteID int) error

func (*Model) DeleteTag

func (m *Model) DeleteTag(tagId int, c *partials.CommonInfo) error

func (*Model) DeleteTask

func (m *Model) DeleteTask(taskId int) error

func (*Model) DeleteTenant added in v0.7.0

func (m *Model) DeleteTenant(tenantID int) error

func (*Model) DeleteUser

func (m *Model) DeleteUser(uid string) error

func (*Model) DeploymentAlreadyInstalled

func (m *Model) DeploymentAlreadyInstalled(agentId, packageId string, c *partials.CommonInfo) (bool, error)

func (*Model) DeploymentFailed

func (m *Model) DeploymentFailed(agentId, packageId string, c *partials.CommonInfo) (bool, error)

func (*Model) DisableAgent

func (m *Model) DisableAgent(agentId string, c *partials.CommonInfo) error

func (*Model) EmailExists

func (m *Model) EmailExists(email string) (bool, error)

func (*Model) EnableAgent

func (m *Model) EnableAgent(agentId string, c *partials.CommonInfo) error

func (*Model) GetAgentAppsByPage

func (m *Model) GetAgentAppsByPage(agentId string, p partials.PaginationAndSort, f filters.ApplicationsFilter, c *partials.CommonInfo) ([]*ent.App, error)

func (*Model) GetAgentById

func (m *Model) GetAgentById(agentId string, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) GetAgentComputerInfo

func (m *Model) GetAgentComputerInfo(agentId string, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) GetAgentLogicalDisksInfo

func (m *Model) GetAgentLogicalDisksInfo(agentId string, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) GetAgentMonitorsInfo

func (m *Model) GetAgentMonitorsInfo(agentId string, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) GetAgentNetworkAdaptersInfo

func (m *Model) GetAgentNetworkAdaptersInfo(agentId string, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) GetAgentOSInfo

func (m *Model) GetAgentOSInfo(agentId string, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) GetAgentOverviewById added in v0.7.0

func (m *Model) GetAgentOverviewById(agentId string, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) GetAgentPrintersInfo

func (m *Model) GetAgentPrintersInfo(agentId string, c *partials.CommonInfo) ([]*ent.Printer, error)

func (*Model) GetAgentSharesInfo

func (m *Model) GetAgentSharesInfo(agentId string, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) GetAgentsByPage

func (m *Model) GetAgentsByPage(p partials.PaginationAndSort, f filters.AgentFilter, excludeWaitingForAdmissionAgents bool, c *partials.CommonInfo) ([]*ent.Agent, error)

func (*Model) GetAgentsBySite added in v0.7.0

func (m *Model) GetAgentsBySite(tenantID int, siteID int) ([]*ent.Agent, error)

func (*Model) GetAgentsByTenant added in v0.7.0

func (m *Model) GetAgentsByTenant(tenantID int) ([]*ent.Agent, error)

func (*Model) GetAgentsReleaseByType

func (m *Model) GetAgentsReleaseByType(release_type release.ReleaseType, channel, os, arch, version string) (*openuem_ent.Release, error)

func (*Model) GetAgentsReleases

func (m *Model) GetAgentsReleases() ([]string, error)

func (*Model) GetAgentsUsedOSes

func (m *Model) GetAgentsUsedOSes(c *partials.CommonInfo) ([]string, error)

func (*Model) GetAllAgents

func (m *Model) GetAllAgents(f filters.AgentFilter, c *partials.CommonInfo) ([]*ent.Agent, error)

func (*Model) GetAllOrgMetadata

func (m *Model) GetAllOrgMetadata(c *partials.CommonInfo) ([]*ent.OrgMetadata, error)

func (*Model) GetAllTags

func (m *Model) GetAllTags(c *partials.CommonInfo) ([]*ent.Tag, error)

func (*Model) GetAllUpdateAgents

func (m *Model) GetAllUpdateAgents(f filters.UpdateAgentsFilter, c *partials.CommonInfo) ([]*ent.Agent, error)

func (*Model) GetAllUpdateServers

func (m *Model) GetAllUpdateServers(f filters.UpdateServersFilter) ([]*ent.Server, error)

func (*Model) GetAntiviriByPage

func (*Model) GetAppliedReleases

func (m *Model) GetAppliedReleases() ([]string, error)

func (*Model) GetAppliedTags

func (m *Model) GetAppliedTags(c *partials.CommonInfo) ([]*ent.Tag, error)

func (*Model) GetAppsByPage

func (*Model) GetAssociatedSites added in v0.7.0

func (m *Model) GetAssociatedSites(t *ent.Tenant) ([]*ent.Site, error)

func (*Model) GetCertificateBySerial

func (m *Model) GetCertificateBySerial(serial string) (*openuem_ent.Certificate, error)

func (*Model) GetCertificateByUID

func (m *Model) GetCertificateByUID(uid string) (*openuem_ent.Certificate, error)

func (*Model) GetCertificatesTypes

func (m *Model) GetCertificatesTypes() ([]string, error)

func (*Model) GetComputerManufacturers

func (m *Model) GetComputerManufacturers(c *partials.CommonInfo) ([]string, error)

func (*Model) GetComputerModels

func (m *Model) GetComputerModels(f filters.AgentFilter, c *partials.CommonInfo) ([]string, error)

func (*Model) GetComputersByPage

func (m *Model) GetComputersByPage(p partials.PaginationAndSort, f filters.AgentFilter, c *partials.CommonInfo) ([]Computer, error)

func (*Model) GetDefaultAgentFrequency

func (m *Model) GetDefaultAgentFrequency(tenantID string) (int, error)

func (*Model) GetDefaultAutoAdmitAgents added in v0.6.0

func (m *Model) GetDefaultAutoAdmitAgents(tenantID string) (bool, error)

func (*Model) GetDefaultCountry

func (m *Model) GetDefaultCountry() (string, error)

func (*Model) GetDefaultDetectRemoteAgents added in v0.6.0

func (m *Model) GetDefaultDetectRemoteAgents(tenantID string) (bool, error)

func (*Model) GetDefaultRefreshTime

func (m *Model) GetDefaultRefreshTime() (int, error)

func (*Model) GetDefaultRemoteAssistanceDisabled added in v0.6.0

func (m *Model) GetDefaultRemoteAssistanceDisabled(tenantID string) (bool, error)

func (*Model) GetDefaultRequestVNCPIN

func (m *Model) GetDefaultRequestVNCPIN(tenantID string) (bool, error)

func (*Model) GetDefaultSFTPDisabled added in v0.6.0

func (m *Model) GetDefaultSFTPDisabled(tenantID string) (bool, error)

func (*Model) GetDefaultSessionLifetime

func (m *Model) GetDefaultSessionLifetime() (int, error)

func (*Model) GetDefaultSite added in v0.7.0

func (m *Model) GetDefaultSite(t *ent.Tenant) (*ent.Site, error)

func (*Model) GetDefaultTenant added in v0.7.0

func (m *Model) GetDefaultTenant() (*ent.Tenant, error)

func (*Model) GetDefaultUpdateChannel

func (m *Model) GetDefaultUpdateChannel() (string, error)

func (*Model) GetDefaultUseBrew added in v0.8.0

func (m *Model) GetDefaultUseBrew(tenantID string) (bool, error)

func (*Model) GetDefaultUseFlatpak

func (m *Model) GetDefaultUseFlatpak(tenantID string) (bool, error)

func (*Model) GetDefaultUseWinget

func (m *Model) GetDefaultUseWinget(tenantID string) (bool, error)

func (*Model) GetDefaultUserCertDuration

func (m *Model) GetDefaultUserCertDuration() (int, error)

func (*Model) GetDefaultWingetFrequency

func (m *Model) GetDefaultWingetFrequency(tenantID string) (int, error)

func (*Model) GetDeployment

func (m *Model) GetDeployment(agentId, packageId string, c *partials.CommonInfo) (*ent.Deployment, error)

func (*Model) GetDeploymentsForAgent

func (m *Model) GetDeploymentsForAgent(agentId string, p partials.PaginationAndSort, c *partials.CommonInfo) ([]*ent.Deployment, error)

func (*Model) GetDetectedAntiviri

func (m *Model) GetDetectedAntiviri(c *partials.CommonInfo) ([]string, error)

func (*Model) GetGeneralSettings

func (m *Model) GetGeneralSettings(tenantID string) (*openuem_ent.Settings, error)

func (*Model) GetHigherAgentReleaseInstalled

func (m *Model) GetHigherAgentReleaseInstalled() (*openuem_ent.Release, error)

func (*Model) GetHigherServerReleaseInstalled

func (m *Model) GetHigherServerReleaseInstalled() (*ent.Server, error)

func (*Model) GetLatestAgentRelease

func (m *Model) GetLatestAgentRelease(channel string) (*openuem_ent.Release, error)

func (*Model) GetLatestServerRelease

func (m *Model) GetLatestServerRelease(channel string) (*openuem_ent.Release, error)

func (*Model) GetLatestUpdates

func (m *Model) GetLatestUpdates(agentId string, p partials.PaginationAndSort, c *partials.CommonInfo) ([]*ent.Update, error)

func (*Model) GetMaxUploadSize

func (m *Model) GetMaxUploadSize() (string, error)

func (*Model) GetMetadataForAgent

func (m *Model) GetMetadataForAgent(agentId string, p partials.PaginationAndSort, c *partials.CommonInfo) ([]*ent.Metadata, error)

func (*Model) GetNATSTimeout

func (m *Model) GetNATSTimeout() (int, error)

func (*Model) GetOSVersions

func (m *Model) GetOSVersions(f filters.AgentFilter, c *partials.CommonInfo) ([]string, error)

func (*Model) GetOrgMetadataByPage

func (m *Model) GetOrgMetadataByPage(p partials.PaginationAndSort, c *partials.CommonInfo) ([]*ent.OrgMetadata, error)

func (*Model) GetProfileById

func (m *Model) GetProfileById(profileId int, c *partials.CommonInfo) (*ent.Profile, error)

func (*Model) GetProfileIssuesByPage

func (m *Model) GetProfileIssuesByPage(p partials.PaginationAndSort, profileID int) ([]*ent.ProfileIssue, error)

func (*Model) GetProfilesByPage

func (m *Model) GetProfilesByPage(p partials.PaginationAndSort, c *partials.CommonInfo) ([]*ent.Profile, error)

func (*Model) GetSMTPSettings

func (m *Model) GetSMTPSettings(tenantID string) (*openuem_ent.Settings, error)

func (*Model) GetServerById

func (m *Model) GetServerById(serverId int) (*ent.Server, error)

func (*Model) GetServerReleases

func (m *Model) GetServerReleases() ([]string, error)

func (*Model) GetServersReleaseByType

func (m *Model) GetServersReleaseByType(release_type release.ReleaseType, channel, os, arch, version string) (*openuem_ent.Release, error)

func (*Model) GetSessionsByPage

func (m *Model) GetSessionsByPage(p partials.PaginationAndSort) ([]*ent.Sessions, error)

func (*Model) GetSite added in v0.7.0

func (m *Model) GetSite(siteID int) (*ent.Site, error)

func (*Model) GetSiteById added in v0.7.0

func (m *Model) GetSiteById(tenantID int, siteID int) (*ent.Site, error)

func (*Model) GetSites added in v0.7.0

func (m *Model) GetSites(tenantID int) ([]*ent.Site, error)

func (*Model) GetSitesByPage added in v0.7.0

func (m *Model) GetSitesByPage(p partials.PaginationAndSort, f filters.SiteFilter, tenantID string) ([]*ent.Site, error)

func (*Model) GetTagsByPage

func (m *Model) GetTagsByPage(p partials.PaginationAndSort, c *partials.CommonInfo) ([]*ent.Tag, error)

func (*Model) GetTasksById

func (m *Model) GetTasksById(taskId int) (*ent.Task, error)

func (*Model) GetTasksForProfileByPage

func (m *Model) GetTasksForProfileByPage(p partials.PaginationAndSort, profileID int, c *partials.CommonInfo) ([]*ent.Task, error)

func (*Model) GetTenantByID added in v0.7.0

func (m *Model) GetTenantByID(tenantID int) (*ent.Tenant, error)

func (*Model) GetTenants added in v0.7.0

func (m *Model) GetTenants() ([]*ent.Tenant, error)

func (*Model) GetTenantsByPage added in v0.7.0

func (m *Model) GetTenantsByPage(p partials.PaginationAndSort, f filters.TenantFilter) ([]*ent.Tenant, error)

func (*Model) GetTop10InstalledApps

func (m *Model) GetTop10InstalledApps() ([]App, error)

func (*Model) GetUpdateAgentsByPage

func (m *Model) GetUpdateAgentsByPage(p partials.PaginationAndSort, f filters.UpdateAgentsFilter, c *partials.CommonInfo) ([]*ent.Agent, error)

func (*Model) GetUpdateServersByPage

func (m *Model) GetUpdateServersByPage(p partials.PaginationAndSort, f filters.UpdateServersFilter) ([]*ent.Server, error)

func (*Model) GetUserById

func (m *Model) GetUserById(uid string) (*ent.User, error)

func (*Model) GetUsersByPage

func (m *Model) GetUsersByPage(p partials.PaginationAndSort, f filters.UserFilter) ([]*ent.User, error)

func (*Model) NewOrgMetadata

func (m *Model) NewOrgMetadata(name, description string, c *partials.CommonInfo) error

func (*Model) NewTag

func (m *Model) NewTag(title, description, color string, c *partials.CommonInfo) error

func (*Model) RegisterUser

func (m *Model) RegisterUser(uid, name, email, phone, country, password string) error

func (*Model) RemoveAdmittedTag

func (m *Model) RemoveAdmittedTag(settingsId int) error

func (*Model) RemoveDeployment

func (m *Model) RemoveDeployment(id int) error

func (*Model) RemovePrinter added in v0.7.0

func (m *Model) RemovePrinter(agentId string, printerName string, c *partials.CommonInfo) error

func (*Model) RemoveTagFromAgent

func (m *Model) RemoveTagFromAgent(agentId, tagId string, c *partials.CommonInfo) error

func (*Model) RemoveTagFromProfile

func (m *Model) RemoveTagFromProfile(profileId int, tagId int) error

func (*Model) RevokeCertificate

func (m *Model) RevokeCertificate(cert *openuem_ent.Certificate, info string, reason int) error

func (*Model) SaveAgentSettings added in v0.6.0

func (m *Model) SaveAgentSettings(agentID string, settings openuem_nats.AgentSetting, c *partials.CommonInfo) (*ent.Agent, error)

func (*Model) SaveAgentUpdateInfo

func (m *Model) SaveAgentUpdateInfo(agentId, status, description, version string, c *partials.CommonInfo) error

func (*Model) SaveDeployInfo

func (m *Model) SaveDeployInfo(data *openuem_nats.DeployAction, deploymentFailed bool, c *partials.CommonInfo) error

func (*Model) SaveEndpointDescription added in v0.7.0

func (m *Model) SaveEndpointDescription(agentID string, description string, c *partials.CommonInfo) error

func (*Model) SaveEndpointType added in v0.7.0

func (m *Model) SaveEndpointType(agentID string, endpointType string, c *partials.CommonInfo) error

func (*Model) SaveMetadata

func (m *Model) SaveMetadata(agentId string, metadataId int, value string) error

func (*Model) SaveNewReleaseAvailable

func (m *Model) SaveNewReleaseAvailable(releaseType release.ReleaseType, newRelease openuem_nats.OpenUEMRelease) error

func (*Model) SaveNotes

func (m *Model) SaveNotes(agentId string, notes string, c *partials.CommonInfo) error

func (*Model) SaveServerUpdateInfo

func (m *Model) SaveServerUpdateInfo(serverId int, status server.UpdateStatus, description, version string) error

func (*Model) ServersExists

func (m *Model) ServersExists() (bool, error)

func (*Model) SetDefaultPrinter added in v0.7.0

func (m *Model) SetDefaultPrinter(agentId string, printerName string, c *partials.CommonInfo) error

func (*Model) SiteNameTaken added in v0.7.0

func (m *Model) SiteNameTaken(tenantID int, desc string) (bool, error)

func (*Model) TenantNameTaken added in v0.7.0

func (m *Model) TenantNameTaken(desc string) (bool, error)

func (*Model) UpdateAgentFrequency

func (m *Model) UpdateAgentFrequency(settingsId, frequency int) error

func (*Model) UpdateAutoAdmitAgents added in v0.6.0

func (m *Model) UpdateAutoAdmitAgents(settingsId int, autoAdmitAgents bool) error

func (*Model) UpdateCountrySetting

func (m *Model) UpdateCountrySetting(settingsId int, country string) error

func (*Model) UpdateDetectRemoteAgents added in v0.6.0

func (m *Model) UpdateDetectRemoteAgents(settingsId int, detectRemoteAgents bool) error

func (*Model) UpdateMaxUploadSizeSetting

func (m *Model) UpdateMaxUploadSizeSetting(settingsId int, size string) error

func (*Model) UpdateNATSTimeoutSetting

func (m *Model) UpdateNATSTimeoutSetting(settingsId, timeout int) error

func (*Model) UpdateOpenUEMChannel

func (m *Model) UpdateOpenUEMChannel(settingsId int, updateChannel string) error

func (*Model) UpdateOrgMetadata

func (m *Model) UpdateOrgMetadata(id int, name, description string, c *partials.CommonInfo) error

func (*Model) UpdateProfile

func (m *Model) UpdateProfile(profileId int, description string, apply string, c *partials.CommonInfo) error

func (*Model) UpdateRefreshTimeSetting

func (m *Model) UpdateRefreshTimeSetting(settingsId, refresh int) error

func (*Model) UpdateRemoteAssistanceDisabled added in v0.6.0

func (m *Model) UpdateRemoteAssistanceDisabled(settingsId int, disableRemoteAssistance bool) error

func (*Model) UpdateRemoteAssistanceToAllAgents added in v0.6.0

func (m *Model) UpdateRemoteAssistanceToAllAgents(status bool, c *partials.CommonInfo) error

func (*Model) UpdateRequestVNCPIN

func (m *Model) UpdateRequestVNCPIN(settingsId int, requestPIN bool) error

func (*Model) UpdateSFTPDisabled added in v0.6.0

func (m *Model) UpdateSFTPDisabled(settingsId int, disableSFTP bool) error

func (*Model) UpdateSFTPServiceToAllAgents added in v0.6.0

func (m *Model) UpdateSFTPServiceToAllAgents(status bool, c *partials.CommonInfo) error

func (*Model) UpdateSMTPSettings

func (m *Model) UpdateSMTPSettings(settings *SMTPSettings) error

func (*Model) UpdateSessionLifetime

func (m *Model) UpdateSessionLifetime(settingsId, sessionLifetime int) error

func (*Model) UpdateSite added in v0.7.0

func (m *Model) UpdateSite(tenantID int, siteID int, desc string, domain string, isDefault bool) error

func (*Model) UpdateTag

func (m *Model) UpdateTag(tagId int, title, description, color string, c *partials.CommonInfo) error

func (*Model) UpdateTaskToProfile

func (m *Model) UpdateTaskToProfile(c echo.Context, taskID int, cfg TaskConfig) error

func (*Model) UpdateTenant added in v0.7.0

func (m *Model) UpdateTenant(tenantID int, desc string, isDefault bool) error

func (*Model) UpdateUseBrew added in v0.8.0

func (m *Model) UpdateUseBrew(settingsId int, useBrew bool) error

func (*Model) UpdateUseFlatpak

func (m *Model) UpdateUseFlatpak(settingsId int, useFlatpak bool) error

func (*Model) UpdateUseWinget

func (m *Model) UpdateUseWinget(settingsId int, useWinGet bool) error

func (*Model) UpdateUser

func (m *Model) UpdateUser(uid, name, email, phone, country string) error

func (*Model) UpdateUserCertDurationSetting

func (m *Model) UpdateUserCertDurationSetting(settingsId, years int) error

func (*Model) UpdateWingetFrequency

func (m *Model) UpdateWingetFrequency(settingsId, frequency int) error

func (*Model) UserExists

func (m *Model) UserExists(uid string) (bool, error)

func (*Model) UserSetRevokedCertificate

func (m *Model) UserSetRevokedCertificate(uid string) error

type SMTPSettings

type SMTPSettings struct {
	ID       int
	Server   string
	Port     int
	User     string
	Password string
	Auth     string
	MailFrom string
}

type SystemUpdate

type SystemUpdate struct {
	ID                 string
	Hostname           string
	OS                 string
	SystemUpdateStatus string    `sql:"system_update_status"`
	LastInstall        time.Time `sql:"last_install"`
	LastSearch         time.Time `sql:"last_search"`
	PendingUpdates     bool      `sql:"pending_updates"`
	SiteID             int
}

type TaskConfig

type TaskConfig struct {
	TaskType                              string
	ExecuteCommand                        string
	PackageID                             string
	PackageName                           string
	PackageLatest                         bool
	Description                           string
	RegistryKey                           string
	RegistryKeyValue                      string
	RegistryKeyValueType                  string
	RegistryKeyValueData                  string
	RegistryHex                           bool
	RegistryForce                         bool
	LocalUserUsername                     string
	LocalUserDescription                  string
	LocalUserFullName                     string
	LocalUserPassword                     string
	LocalUserDisabled                     bool
	LocalUserPasswordChangeNotAllowed     bool
	LocalUserPasswordChangeRequired       bool
	LocalUserNeverExpires                 bool
	LocalUserID                           string
	LocalUserPrimaryGroup                 string
	LocalUserSupplementaryGroup           string
	LocalUserCreateHome                   bool
	LocalUserGenerateSSHKey               bool
	LocalUserSystemAccount                bool
	LocalUserHome                         string
	LocalUserShell                        string
	LocalUserUmask                        string
	LocalUserSkeleton                     string
	LocalUserExpires                      string
	LocalUserPasswordLock                 bool
	LocalUserPasswordExpireMax            string
	LocalUserPasswordExpireMin            string
	LocalUserPasswordExpireAccountDisable string
	LocalUserPasswordExpireWarn           string
	LocalUserSSHKeyBits                   string
	LocalUserSSHKeyComment                string
	LocalUserSSHKeyFile                   string
	LocalUserSSHKeyPassphrase             string
	LocalUserSSHKeyType                   string
	LocalUserUIDMax                       string
	LocalUserUIDMin                       string
	LocalUserForce                        bool
	LocalUserAppend                       bool
	LocalGroupName                        string
	LocalGroupDescription                 string
	LocalGroupMembers                     string
	LocalGroupMembersToInclude            string
	LocalGroupMembersToExclude            string
	LocalGroupID                          string
	LocalGroupSystem                      bool
	LocalGroupForce                       bool
	MsiProductID                          string
	MsiPath                               string
	MsiArguments                          string
	MsiLogPath                            string
	MsiHashAlgorithm                      string
	MsiFileHash                           string
	ShellScript                           string
	ShellRunConfig                        string
	ShellExecute                          string
	ShellCreates                          string
	AgentsType                            string
	HomeBrewUpgradeAll                    bool
	HomeBrewUpdate                        bool
	HomeBrewInstallOptions                string
	HomeBrewUpgradeOptions                string
	HomeBrewGreedy                        bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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