Documentation
¶
Index ¶
- Constants
- type Entry
- type Manager
- func (m *Manager) CloseSession(sessionID uint) error
- func (m *Manager) CreateSession(env environments.TLSEnvironment, node nodes.OsqueryNode, creator string) (Session, error)
- func (m *Manager) GetRequest(sessionID, requestID uint) (Request, error)
- func (m *Manager) GetSession(sessionID uint) (Session, error)
- func (m *Manager) ListDirectory(sessionID uint, target string, timeout time.Duration) (Request, error)
- func (m *Manager) RefreshRequestStatus(requestID uint) (Request, error)
- func (m *Manager) RequestResults(requestID uint) ([]Entry, error)
- func (m *Manager) StatPath(sessionID uint, target string, timeout time.Duration) (Request, error)
- func (m *Manager) TouchSession(sessionID uint) (Session, error)
- type Request
- type Session
Constants ¶
View Source
const ( ActionList = "list" ActionStat = "stat" StatusQueued = "queued" StatusCompleted = "completed" StatusError = "error" StatusExpired = "expired" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Path string `json:"path"`
Filename string `json:"filename"`
Directory string `json:"directory"`
Type string `json:"type"`
Size int64 `json:"size,omitempty"`
Mode string `json:"mode,omitempty"`
UID string `json:"uid,omitempty"`
GID string `json:"gid,omitempty"`
MTime int64 `json:"mtime,omitempty"`
ATime int64 `json:"atime,omitempty"`
CTime int64 `json:"ctime,omitempty"`
}
type Manager ¶
func (*Manager) CloseSession ¶
func (*Manager) CreateSession ¶
func (m *Manager) CreateSession(env environments.TLSEnvironment, node nodes.OsqueryNode, creator string) (Session, error)
func (*Manager) GetRequest ¶
func (*Manager) ListDirectory ¶
func (*Manager) RefreshRequestStatus ¶
type Request ¶
type Request struct {
ID uint `gorm:"primarykey" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
SessionID uint `gorm:"not null;index" json:"session_id"`
Action string `gorm:"not null;index" json:"action"`
Path string `gorm:"not null" json:"path"`
TranslatedSQL string `json:"translated_sql"`
DistributedQueryName string `gorm:"index" json:"distributed_query_name,omitempty"`
Status string `gorm:"not null;index" json:"status"`
Error string `json:"error,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
ExpiredAt *time.Time `json:"expired_at,omitempty"`
}
type Session ¶
type Session struct {
ID uint `gorm:"primarykey" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
EnvironmentID uint `gorm:"not null;index" json:"environment_id"`
NodeID uint `gorm:"not null;index" json:"node_id"`
NodeUUID string `gorm:"not null;index" json:"node_uuid"`
Creator string `gorm:"not null;index" json:"creator"`
Platform string `json:"platform"`
Root string `gorm:"not null" json:"root"`
Active bool `gorm:"not null;default:true" json:"active"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.