Documentation ¶
Index ¶
Constants ¶
View Source
const ( ResponseStatusOk = "ok" ResponseStatusError = "error" )
Variables ¶
View Source
var (
ErrUnknownMessage = errors.New("unknown command type")
)
Message errors
Functions ¶
Types ¶
type Message ¶
type Message interface {
GetName() MessageName
}
Message represents the message interface
type MessageName ¶
type MessageName string
MessageName is a message ID type
const ( StartMonitorName MessageName = "cmd.monitor.start" StopMonitorName MessageName = "cmd.monitor.stop" ShutdownSensorName MessageName = "cmd.sensor.shutdown" )
Supported messages
type Response ¶
type Response struct {
Status string `json:"status"`
}
Response contains the command response status information
type ShutdownSensor ¶
type ShutdownSensor struct{}
ShutdownSensor contains the 'shutdown sensor' command fields
func (*ShutdownSensor) GetName ¶
func (m *ShutdownSensor) GetName() MessageName
GetName returns the command message ID for the 'shutdown sensor' command
type StartMonitor ¶
type StartMonitor struct { AppName string `json:"app_name"` AppArgs []string `json:"app_args,omitempty"` AppUser string `json:"app_user,omitempty"` RunTargetAsUser bool `json:"run_tas_user,omitempty"` KeepPerms bool `json:"keep_perms,omitempty"` Perms map[string]*fsutil.AccessInfo `json:"perms,omitempty"` Excludes []string `json:"excludes,omitempty"` Preserves map[string]*fsutil.AccessInfo `json:"preserves,omitempty"` Includes map[string]*fsutil.AccessInfo `json:"includes,omitempty"` IncludeBins []string `json:"include_bins,omitempty"` IncludeExes []string `json:"include_exes,omitempty"` IncludeShell bool `json:"include_shell,omitempty"` IncludeCertAll bool `json:"include_cert_all,omitempty"` IncludeCertBundles bool `json:"include_cert_bundles,omitempty"` IncludeCertDirs bool `json:"include_cert_dirs,omitempty"` IncludeCertPKAll bool `json:"include_cert_pk_all,omitempty"` IncludeCertPKDirs bool `json:"include_cert_pk_dirs,omitempty"` IncludeNew bool `json:"include_new,omitempty"` }
StartMonitor contains the start monitor command fields
func (*StartMonitor) GetName ¶
func (m *StartMonitor) GetName() MessageName
GetName returns the command message ID for the start monitor command
type StopMonitor ¶
type StopMonitor struct { }
StopMonitor contains the stop monitor command fields
func (*StopMonitor) GetName ¶
func (m *StopMonitor) GetName() MessageName
GetName returns the command message ID for the stop monitor command
Click to show internal directories.
Click to hide internal directories.