Documentation
¶
Overview ¶
Package service contains all the service handlers
Index ¶
- func AppEventHandler(app core.App) error
- func AuditEventHandler(app core.App) error
- func GetMachineUsers(app core.App, machine *models.Record) (map[string][]string, error)
- func GetUserMachines(app core.App, user *models.Record) ([]*models.Record, error)
- func InstallAgent(app core.App, machine *models.Record)
- func KeyCheck(app core.App) error
- func MachineEventHandler(app core.App) error
- func ManualUpdate(app core.App, machine *models.Record)
- func Restore(machine *models.Record)
- func Server() error
- func UserEventHandler(app core.App) error
- type Group
- type Machine
- type Permission
- type Tag
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppEventHandler ¶
func AuditEventHandler ¶
func GetMachineUsers ¶
GetMachineUsers fetches all principals based on a machine
func GetUserMachines ¶
GetUserMachines fetches all machines based on a user
func InstallAgent ¶
TODO: Check if agent is installed and running, if not try to restart
func MachineEventHandler ¶
func ManualUpdate ¶
ManualUpdate for machines running without an agent
func UserEventHandler ¶
Types ¶
type Machine ¶
type Machine struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
Agent bool `json:"agent,omitempty"`
Error string `json:"error,omitempty"`
Provider string `json:"provider,omitempty"`
Tags []string `json:"tags,omitempty"`
Users []string `json:"users,omitempty"`
Groups []string `json:"groups,omitempty"`
}
type Permission ¶
type Permission struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CanCreate bool `json:"can_create"`
CanUpdate bool `json:"can_update"`
CanDelete bool `json:"can_delete"`
AccessUsers bool `json:"access_users"`
AccessMachines bool `json:"access_machines"`
AccessGroups bool `json:"access_groups"`
IsAdmin bool `json:"is_admin"`
Users []string `json:"users,omitempty"`
Groups []string `json:"groups,omitempty"`
Machines []string `json:"machines,omitempty"`
}
type User ¶
type User struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Username string `json:"username,omitempty"`
Principal string `json:"principal,omitempty"`
Avatar string `json:"avatar,omitempty"`
Email string `json:"email,omitempty"`
EmailVisibility bool `json:"emailVisibility,omitempty"`
Verified bool `json:"verified,omitempty"`
Permission string `json:"permission,omitempty"`
Groups []string `json:"groups,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.