handlers

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: 78 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateChannels = []string{"stable", "devel", "testing"}

Functions

func GetAgentsReport

func GetAgentsReport(c echo.Context, agents []*ent.Agent) (core.Maroto, error)

func GetAntiviriReport

func GetAntiviriReport(c echo.Context, antiviri []models.Antivirus) (core.Maroto, error)

func GetComputersReport

func GetComputersReport(c echo.Context, computers []models.Computer) (core.Maroto, error)

func GetSoftwareReport

func GetSoftwareReport(c echo.Context, software []models.App) (core.Maroto, error)

func GetSystemUpdatesReport

func GetSystemUpdatesReport(c echo.Context, updates []models.SystemUpdate) (core.Maroto, error)

func RenderConfirm

func RenderConfirm(c echo.Context, cmp templ.Component) error

func RenderError

func RenderError(c echo.Context, cmp templ.Component) error

func RenderLogin

func RenderLogin(c echo.Context, cmp templ.Component) error

func RenderSuccess

func RenderSuccess(c echo.Context, cmp templ.Component) error

func RenderView

func RenderView(c echo.Context, cmp templ.Component) error

func RenderViewWithReplaceUrl

func RenderViewWithReplaceUrl(c echo.Context, cmp templ.Component, url *url.URL) error

Types

type CheckedItemsForm

type CheckedItemsForm struct {
	Cwd         string   `form:"cwd" query:"cwd"`
	Dst         string   `form:"dst" query:"dst"`
	FolderCheck []string `form:"check-folder" query:"check-folder"`
	FileCheck   []string `form:"check-file" query:"check-file"`
	Parent      string   `form:"parent" query:"parent"`
}

type Handler

type Handler struct {
	Model *models.Model

	SessionManager       *sessions.SessionManager
	JWTKey               string
	CertPath             string
	KeyPath              string
	SFTPKeyPath          string
	CACertPath           string
	DownloadDir          string
	ServerName           string
	AuthPort             string
	ConsolePort          string
	Domain               string
	TaskScheduler        gocron.Scheduler
	NATSServers          string
	NATSTimeout          int
	NATSConnection       *nats.Conn
	NATSConnectJob       gocron.Job
	JetStream            jetstream.JetStream
	JetStreamCancelFunc  context.CancelFunc
	AgentStream          jetstream.Stream
	ServerStream         jetstream.Stream
	OrgName              string
	OrgProvince          string
	OrgLocality          string
	OrgAddress           string
	Country              string
	ReverseProxyAuthPort string
	ReverseProxyServer   string
	LatestServerRelease  openuem_nats.OpenUEMRelease
	Replicas             int
	ServerReleasesFolder string
	WingetFolder         string
	FlatpakFolder        string
	BrewFolder           string
	CommonFolder         string
	Version              string
}

func NewHandler

func NewHandler(model *models.Model, natsServers string, s *sessions.SessionManager, ts gocron.Scheduler, jwtKey, certPath, keyPath, sftpKeyPath, caCertPath, server, authPort, tmpDownloadDir, domain, orgName, orgProvince, orgLocality, orgAddress, country, reverseProxyAuthPort, reverseProxyServer, serverReleasesFolder, wingetFolder, flatpakFolder, brewFolder, commonFolder, version string) *Handler

func (*Handler) AddSite added in v0.7.0

func (h *Handler) AddSite(c echo.Context) error

func (*Handler) AddTenant added in v0.7.0

func (h *Handler) AddTenant(c echo.Context) error

func (*Handler) AddUser

func (h *Handler) AddUser(c echo.Context) error

func (*Handler) AgentAdmit

func (h *Handler) AgentAdmit(c echo.Context) error

func (*Handler) AgentConfirmAdmission

func (h *Handler) AgentConfirmAdmission(c echo.Context, regenerate bool) error

func (*Handler) AgentConfirmDelete

func (h *Handler) AgentConfirmDelete(c echo.Context) error

func (*Handler) AgentConfirmDisable

func (h *Handler) AgentConfirmDisable(c echo.Context) error

func (*Handler) AgentDelete

func (h *Handler) AgentDelete(c echo.Context) error

func (*Handler) AgentDisable

func (h *Handler) AgentDisable(c echo.Context) error

func (*Handler) AgentEnable

func (h *Handler) AgentEnable(c echo.Context) error

func (*Handler) AgentForceRestart

func (h *Handler) AgentForceRestart(c echo.Context) error

func (*Handler) AgentForceRun

func (h *Handler) AgentForceRun(c echo.Context) error

func (*Handler) AgentLogs added in v0.6.0

func (h *Handler) AgentLogs(c echo.Context) error

func (*Handler) AgentSettings added in v0.6.0

func (h *Handler) AgentSettings(c echo.Context) error

func (*Handler) AgentsAdmit

func (h *Handler) AgentsAdmit(c echo.Context) error

func (*Handler) AgentsDisable

func (h *Handler) AgentsDisable(c echo.Context) error

func (*Handler) AgentsEnable

func (h *Handler) AgentsEnable(c echo.Context) error

func (*Handler) ApplyGlobalSettings added in v0.7.0

func (h *Handler) ApplyGlobalSettings(c echo.Context) error

func (*Handler) Apps

func (h *Handler) Apps(c echo.Context) error

func (*Handler) AskForConfirmation

func (h *Handler) AskForConfirmation(c echo.Context) error

func (*Handler) Auth

func (h *Handler) Auth(c echo.Context) error

func (*Handler) BrowseLogicalDisk

func (h *Handler) BrowseLogicalDisk(c echo.Context) error

func (*Handler) CertificateConfirmRevocation

func (h *Handler) CertificateConfirmRevocation(c echo.Context) error

func (*Handler) ChangeAgentFrequency added in v0.6.0

func (h *Handler) ChangeAgentFrequency(c echo.Context, settings *models.GeneralSettings) error

func (*Handler) ChangeRemoteAssistanceSetting added in v0.6.0

func (h *Handler) ChangeRemoteAssistanceSetting(c echo.Context, settings *models.GeneralSettings) error

func (*Handler) ChangeSFTPSetting added in v0.6.0

func (h *Handler) ChangeSFTPSetting(c echo.Context, settings *models.GeneralSettings) error

func (*Handler) ChangeWingetFrequency added in v0.6.0

func (h *Handler) ChangeWingetFrequency(c echo.Context, settings *models.GeneralSettings) error

func (*Handler) CheckNATSComponentStatus

func (h *Handler) CheckNATSComponentStatus(data *dashboard_views.DashboardData)

func (*Handler) Computer

func (h *Handler) Computer(c echo.Context) error

func (*Handler) ComputerConfirmDelete

func (h *Handler) ComputerConfirmDelete(c echo.Context) error

func (*Handler) ComputerDeploy

func (h *Handler) ComputerDeploy(c echo.Context, successMessage string) error

func (*Handler) ComputerDeployInstall

func (h *Handler) ComputerDeployInstall(c echo.Context) error

func (*Handler) ComputerDeploySearchPackagesInstall

func (h *Handler) ComputerDeploySearchPackagesInstall(c echo.Context) error

func (*Handler) ComputerDeployUninstall

func (h *Handler) ComputerDeployUninstall(c echo.Context) error

func (*Handler) ComputerDeployUpdate

func (h *Handler) ComputerDeployUpdate(c echo.Context) error

func (*Handler) ComputerMetadata

func (h *Handler) ComputerMetadata(c echo.Context) error

func (*Handler) ComputerStartVNC

func (h *Handler) ComputerStartVNC(c echo.Context) error

func (*Handler) ComputerStopVNC

func (h *Handler) ComputerStopVNC(c echo.Context) error

func (*Handler) ComputersList

func (h *Handler) ComputersList(c echo.Context, successMessage string, comesFromDialog bool) error

func (*Handler) ConfirmDeleteProfile

func (h *Handler) ConfirmDeleteProfile(c echo.Context) error

func (*Handler) ConfirmDeleteTask

func (h *Handler) ConfirmDeleteTask(c echo.Context) error

func (*Handler) ConfirmEmail

func (h *Handler) ConfirmEmail(c echo.Context) error

func (*Handler) Dashboard

func (h *Handler) Dashboard(c echo.Context) error

func (*Handler) DeleteItem

func (h *Handler) DeleteItem(c echo.Context) error

func (*Handler) DeleteMany

func (h *Handler) DeleteMany(c echo.Context) error

func (*Handler) DeleteServer

func (h *Handler) DeleteServer(c echo.Context) error

func (*Handler) DeleteServerConfirm

func (h *Handler) DeleteServerConfirm(c echo.Context) error

func (*Handler) DeleteSite added in v0.7.0

func (h *Handler) DeleteSite(c echo.Context) error

func (*Handler) DeleteTenant added in v0.7.0

func (h *Handler) DeleteTenant(c echo.Context) error

func (*Handler) DeleteUser

func (h *Handler) DeleteUser(c echo.Context) error

func (*Handler) DeployInstall

func (h *Handler) DeployInstall(c echo.Context) error

func (*Handler) DeployPackageToSelectedAgents

func (h *Handler) DeployPackageToSelectedAgents(c echo.Context) error

func (*Handler) DeployUninstall

func (h *Handler) DeployUninstall(c echo.Context) error

func (*Handler) Download

func (h *Handler) Download(c echo.Context) error

func (*Handler) DownloadFile

func (h *Handler) DownloadFile(c echo.Context) error

func (*Handler) DownloadFolderAsZIP

func (h *Handler) DownloadFolderAsZIP(c echo.Context) error

func (*Handler) DownloadManyAsZIP

func (h *Handler) DownloadManyAsZIP(c echo.Context) error

func (*Handler) EditProfile

func (h *Handler) EditProfile(c echo.Context, method string, id string, successMessage string) error

func (*Handler) EditSite added in v0.7.0

func (h *Handler) EditSite(c echo.Context) error

func (*Handler) EditTask

func (h *Handler) EditTask(c echo.Context) error

func (*Handler) EditTenant added in v0.7.0

func (h *Handler) EditTenant(c echo.Context) error

func (*Handler) EditUser

func (h *Handler) EditUser(c echo.Context) error

func (*Handler) EmailExists

func (h *Handler) EmailExists(c echo.Context) error

func (*Handler) GeneralSettings

func (h *Handler) GeneralSettings(c echo.Context) error

func (*Handler) GenerateAgentsCSVReport added in v0.6.0

func (h *Handler) GenerateAgentsCSVReport(c echo.Context, w *csv.Writer, fileName string) error

func (*Handler) GenerateAgentsReport

func (h *Handler) GenerateAgentsReport(c echo.Context) error

func (*Handler) GenerateAntivirusCSVReport added in v0.6.0

func (h *Handler) GenerateAntivirusCSVReport(c echo.Context, w *csv.Writer, fileName string) error

func (*Handler) GenerateAntivirusReport

func (h *Handler) GenerateAntivirusReport(c echo.Context) error

func (*Handler) GenerateCSVReports added in v0.6.0

func (h *Handler) GenerateCSVReports(c echo.Context) error

func (*Handler) GenerateComputersCSVReport added in v0.6.0

func (h *Handler) GenerateComputersCSVReport(c echo.Context, w *csv.Writer, fileName string) error

func (*Handler) GenerateComputersReport

func (h *Handler) GenerateComputersReport(c echo.Context) error

func (*Handler) GenerateRDPFile

func (h *Handler) GenerateRDPFile(c echo.Context) error

func (*Handler) GenerateSoftwareCSVReport added in v0.6.0

func (h *Handler) GenerateSoftwareCSVReport(c echo.Context, w *csv.Writer, fileName string) error

func (*Handler) GenerateSoftwareReport

func (h *Handler) GenerateSoftwareReport(c echo.Context) error

func (*Handler) GenerateUpdatesCSVReport added in v0.6.0

func (h *Handler) GenerateUpdatesCSVReport(c echo.Context, w *csv.Writer, fileName string) error

func (*Handler) GenerateUpdatesReport

func (h *Handler) GenerateUpdatesReport(c echo.Context) error

func (*Handler) GetAdminSiteName added in v0.7.0

func (h *Handler) GetAdminSiteName(commonInfo *partials.CommonInfo) string

func (*Handler) GetAdminTenantName added in v0.7.0

func (h *Handler) GetAdminTenantName(commonInfo *partials.CommonInfo) string

func (*Handler) GetAgentFilters

func (h *Handler) GetAgentFilters(c echo.Context) (*filters.AgentFilter, error)

func (*Handler) GetAgentLogFile added in v0.6.0

func (h *Handler) GetAgentLogFile(agent *ent.Agent, path string) (string, error)

func (*Handler) GetAntiviriFilters

func (h *Handler) GetAntiviriFilters(c echo.Context) (*filters.AntivirusFilter, []string, []string, error)

func (*Handler) GetCertificates

func (h *Handler) GetCertificates(c echo.Context, successMessage string) error

func (*Handler) GetCommonInfo added in v0.7.0

func (h *Handler) GetCommonInfo(c echo.Context) (*partials.CommonInfo, error)

func (*Handler) GetComputerFilters

func (h *Handler) GetComputerFilters(c echo.Context) (*filters.AgentFilter, error)

func (*Handler) GetDropdownSites added in v0.7.0

func (h *Handler) GetDropdownSites(c echo.Context) error

func (*Handler) GetSoftwareFilters

func (h *Handler) GetSoftwareFilters(c echo.Context) (*filters.ApplicationsFilter, error)

func (*Handler) GetSystemUpdatesFilters

func (h *Handler) GetSystemUpdatesFilters(c echo.Context) (*filters.SystemUpdatesFilter, []string, []string, error)

func (*Handler) ImportSites added in v0.7.0

func (h *Handler) ImportSites(c echo.Context) error

func (*Handler) ImportTenants added in v0.7.0

func (h *Handler) ImportTenants(c echo.Context) error

func (*Handler) ImportUsers

func (h *Handler) ImportUsers(c echo.Context) error

func (*Handler) IsAuthenticated

func (h *Handler) IsAuthenticated(next echo.HandlerFunc) echo.HandlerFunc

func (*Handler) ListAgents

func (h *Handler) ListAgents(c echo.Context, successMessage, errMessage string, comesFromDialog bool) error

func (*Handler) ListAntivirusStatus

func (h *Handler) ListAntivirusStatus(c echo.Context) error

func (*Handler) ListCertificates

func (h *Handler) ListCertificates(c echo.Context) error

func (*Handler) ListLatestUpdates

func (h *Handler) ListLatestUpdates(c echo.Context) error

func (*Handler) ListSecurityUpdatesStatus

func (h *Handler) ListSecurityUpdatesStatus(c echo.Context) error

func (*Handler) ListSessions

func (h *Handler) ListSessions(c echo.Context, successMessage string) error

func (*Handler) ListSites added in v0.7.0

func (h *Handler) ListSites(c echo.Context, successMessage, errMessage string, confirmDelete bool) error

func (*Handler) ListTenants added in v0.7.0

func (h *Handler) ListTenants(c echo.Context, successMessage, errMessage string, confirmDelete bool) error

func (*Handler) ListUsers

func (h *Handler) ListUsers(c echo.Context, successMessage, errMessage string) error

func (*Handler) LogicalDisks

func (h *Handler) LogicalDisks(c echo.Context) error

func (*Handler) Login

func (h *Handler) Login(c echo.Context) error

func (*Handler) Logout

func (h *Handler) Logout(c echo.Context) error

func (*Handler) Monitors

func (h *Handler) Monitors(c echo.Context) error

func (*Handler) NetworkAdapters

func (h *Handler) NetworkAdapters(c echo.Context) error

func (*Handler) NetworkPrinters

func (h *Handler) NetworkPrinters(c echo.Context) error

func (*Handler) NewFolder

func (h *Handler) NewFolder(c echo.Context) error

func (*Handler) NewProfile

func (h *Handler) NewProfile(c echo.Context) error

func (*Handler) NewSite added in v0.7.0

func (h *Handler) NewSite(c echo.Context) error

func (*Handler) NewTask

func (h *Handler) NewTask(c echo.Context) error

func (*Handler) NewTenant added in v0.7.0

func (h *Handler) NewTenant(c echo.Context) error

func (*Handler) NewUser

func (h *Handler) NewUser(c echo.Context) error

func (*Handler) Notes

func (h *Handler) Notes(c echo.Context) error

func (*Handler) OperatingSystem

func (h *Handler) OperatingSystem(c echo.Context) error

func (*Handler) OrgMetadataManager

func (h *Handler) OrgMetadataManager(c echo.Context) error

func (*Handler) Overview added in v0.7.0

func (h *Handler) Overview(c echo.Context) error

func (*Handler) PowerManagement

func (h *Handler) PowerManagement(c echo.Context) error

func (*Handler) Printers

func (h *Handler) Printers(c echo.Context) error

func (*Handler) ProfileIssues

func (h *Handler) ProfileIssues(c echo.Context) error

func (*Handler) ProfileTags

func (h *Handler) ProfileTags(c echo.Context) error

func (*Handler) ProfileTaskDefinition added in v0.9.0

func (h *Handler) ProfileTaskDefinition(c echo.Context) error

func (*Handler) ProfileTaskSubTypes added in v0.9.0

func (h *Handler) ProfileTaskSubTypes(c echo.Context) error

func (*Handler) ProfileTaskTypes added in v0.9.0

func (h *Handler) ProfileTaskTypes(c echo.Context) error

func (*Handler) Profiles

func (h *Handler) Profiles(c echo.Context, successMessage string) error

func (*Handler) Register

func (h *Handler) Register(e *echo.Echo)

func (*Handler) RemoteAssistance

func (h *Handler) RemoteAssistance(c echo.Context) error

func (*Handler) RemovePrinter added in v0.7.0

func (h *Handler) RemovePrinter(c echo.Context) error

func (*Handler) RenameItem

func (h *Handler) RenameItem(c echo.Context) error

func (*Handler) RenderMarkdown

func (h *Handler) RenderMarkdown(c echo.Context) error

func (*Handler) RenewUserCertificate

func (h *Handler) RenewUserCertificate(c echo.Context) error

func (*Handler) Reports

func (h *Handler) Reports(c echo.Context) error

func (*Handler) RequestUserCertificate

func (h *Handler) RequestUserCertificate(c echo.Context) error

func (*Handler) RevocateCertificate

func (h *Handler) RevocateCertificate(c echo.Context) error

func (*Handler) SMTPSettings

func (h *Handler) SMTPSettings(c echo.Context) error

func (*Handler) SearchFlatpakPackages added in v0.9.0

func (h *Handler) SearchFlatpakPackages(c echo.Context) error

func (*Handler) SearchHomeBrewCasksPackages added in v0.9.0

func (h *Handler) SearchHomeBrewCasksPackages(c echo.Context) error

func (*Handler) SearchHomeBrewFormulaePackages added in v0.9.0

func (h *Handler) SearchHomeBrewFormulaePackages(c echo.Context) error

func (*Handler) SearchPackagesAction

func (h *Handler) SearchPackagesAction(c echo.Context, install bool) error

func (*Handler) SearchWingetPackages

func (h *Handler) SearchWingetPackages(c echo.Context) error

func (*Handler) SelectPackageDeployment

func (h *Handler) SelectPackageDeployment(c echo.Context) error

func (*Handler) SendCertificateRequestToNATS

func (h *Handler) SendCertificateRequestToNATS(c echo.Context, user *openuem_ent.User) error

func (*Handler) SendRegister

func (h *Handler) SendRegister(c echo.Context) error

func (*Handler) SessionConfirmDelete

func (h *Handler) SessionConfirmDelete(c echo.Context) error

func (*Handler) SessionDelete

func (h *Handler) SessionDelete(c echo.Context) error

func (*Handler) SetDefaultPrinter added in v0.7.0

func (h *Handler) SetDefaultPrinter(c echo.Context) error

func (*Handler) SetEmailConfirmed

func (h *Handler) SetEmailConfirmed(c echo.Context) error

func (*Handler) Shares

func (h *Handler) Shares(c echo.Context) error

func (*Handler) ShowUpdateAgentList

func (h *Handler) ShowUpdateAgentList(c echo.Context, r *openuem_ent.Release, successMessage, errorMessage string) error

func (*Handler) ShowUpdateServersList

func (h *Handler) ShowUpdateServersList(c echo.Context, r *openuem_ent.Release, successMessage, errorMessage string) error

func (*Handler) SignIn

func (h *Handler) SignIn(c echo.Context) error

func (*Handler) Software

func (h *Handler) Software(c echo.Context) error

func (*Handler) StartNATSConnectJob

func (h *Handler) StartNATSConnectJob() error

func (*Handler) TagManager

func (h *Handler) TagManager(c echo.Context) error

func (*Handler) TestSMTPSettings

func (h *Handler) TestSMTPSettings(c echo.Context) error

func (*Handler) UIDExists

func (h *Handler) UIDExists(c echo.Context) error

func (*Handler) UpdateAgents

func (h *Handler) UpdateAgents(c echo.Context) error

func (*Handler) UpdateAgentsConfirm

func (h *Handler) UpdateAgentsConfirm(c echo.Context) error

func (*Handler) UpdateServers

func (h *Handler) UpdateServers(c echo.Context) error

func (*Handler) UpdateServersConfirm

func (h *Handler) UpdateServersConfirm(c echo.Context) error

func (*Handler) UploadFile

func (h *Handler) UploadFile(c echo.Context) error

type MyCustomClaims

type MyCustomClaims struct {
	jwt.RegisteredClaims
}

type NewTenant added in v0.7.0

type NewTenant struct {
	UID     string `form:"uid" validate:"required"`
	Name    string `form:"name" validate:"required"`
	Email   string `form:"email" validate:"required,email"`
	Phone   string `form:"phone"`
	Country string `form:"country"`
}

type NewUser

type NewUser struct {
	UID     string `form:"uid" validate:"required"`
	Name    string `form:"name" validate:"required"`
	Email   string `form:"email" validate:"required,email"`
	Phone   string `form:"phone"`
	Country string `form:"country"`
}

type RegisterRequest

type RegisterRequest struct {
	UID      string `form:"uid" validate:"required"`
	Name     string `form:"name" validate:"required"`
	Email    string `form:"email" validate:"required,email"`
	Phone    string `form:"phone" validate:"required,e164"`
	Country  string `form:"country" validate:"required,iso3166_1_alpha2"`
	Password string `form:"password" validate:"required"`
}

Jump to

Keyboard shortcuts

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