Documentation
¶
Index ¶
- Variables
- func FromEnv(name string, defaults []string) []string
- type Asset
- type Case
- type Enum
- type Enums
- type Event
- type Evidence
- type Hook
- type Indicator
- type Job
- type Key
- type Malware
- type Note
- type Policy
- type Report
- type Store
- func (store *Store) AckJob(id string, status string, errmsg string) error
- func (store *Store) AddPolicy(sec string, ptype string, rule []string) error
- func (store *Store) DeleteAsset(cid string, id string) error
- func (store *Store) DeleteCase(cid string) error
- func (store *Store) DeleteEnum(id string) error
- func (store *Store) DeleteEvent(cid string, id string) error
- func (store *Store) DeleteEvidence(cid string, id string) error
- func (store *Store) DeleteHook(id string) error
- func (store *Store) DeleteIndicator(cid string, id string) error
- func (store *Store) DeleteKey(key string) error
- func (store *Store) DeleteMalware(cid string, id string) error
- func (store *Store) DeleteNote(cid string, id string) error
- func (store *Store) DeleteReport(id string) error
- func (store *Store) DeleteTask(cid string, id string) error
- func (store *Store) DeleteUser(id string) error
- func (store *Store) GetAsset(cid string, id string) (Asset, error)
- func (store *Store) GetAssetByName(cid string, name string) (Asset, error)
- func (store *Store) GetCase(cid string) (Case, error)
- func (store *Store) GetCaseFull(cid string) (Case, error)
- func (store *Store) GetCasePermissions(cid string) ([]string, error)
- func (store *Store) GetEnum(id string) (Enum, error)
- func (store *Store) GetEvent(cid string, id string) (Event, error)
- func (store *Store) GetEvidence(cid string, id string) (Evidence, error)
- func (store *Store) GetHook(id string) (Hook, error)
- func (store *Store) GetIndicator(cid string, id string) (Indicator, error)
- func (store *Store) GetIndicatorByValue(cid string, value string) (Indicator, error)
- func (store *Store) GetJobs(eid string) ([]Job, error)
- func (store *Store) GetKey(key string) (Key, error)
- func (store *Store) GetMalware(cid string, id string) (Malware, error)
- func (store *Store) GetNote(cid string, id string) (Note, error)
- func (store *Store) GetReport(id string) (Report, error)
- func (store *Store) GetReportByName(name string) (Report, error)
- func (store *Store) GetRunningJobs() ([]Job, error)
- func (store *Store) GetTask(cid string, id string) (Task, error)
- func (store *Store) GetUser(id string) (User, error)
- func (store *Store) GetUserPermissions(uid string) ([]string, error)
- func (store *Store) ListAssets(cid string) ([]Asset, error)
- func (store *Store) ListCases() ([]Case, error)
- func (store *Store) ListEnums() (Enums, error)
- func (store *Store) ListEvents(cid string) ([]Event, error)
- func (store *Store) ListEvidences(cid string) ([]Evidence, error)
- func (store *Store) ListHooks() ([]Hook, error)
- func (store *Store) ListIndicators(cid string) ([]Indicator, error)
- func (store *Store) ListKeys() ([]Key, error)
- func (store *Store) ListMalware(cid string) ([]Malware, error)
- func (store *Store) ListNotes(cid string) ([]Note, error)
- func (store *Store) ListReports() ([]Report, error)
- func (store *Store) ListTasks(cid string) ([]Task, error)
- func (store *Store) ListUsers() ([]User, error)
- func (store *Store) LoadPolicy(model model.Model) error
- func (store *Store) PopJob(workerid string, modules []string) (Job, Case, Evidence, error)
- func (store *Store) PushJob(obj Job) error
- func (store *Store) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
- func (store *Store) RemovePolicy(sec string, ptype string, rule []string) error
- func (store *Store) RescheduleStaleJobs() error
- func (store *Store) RescheduleWorkerJobs(workerToken string) error
- func (store *Store) SaveAsset(cid string, obj Asset) error
- func (store *Store) SaveCase(obj Case) error
- func (store *Store) SaveEnum(obj Enum) error
- func (store *Store) SaveEvent(cid string, obj Event, override bool) error
- func (store *Store) SaveEvidence(cid string, obj Evidence) error
- func (store *Store) SaveHook(obj Hook) error
- func (store *Store) SaveIndicator(cid string, obj Indicator, override bool) error
- func (store *Store) SaveJob(obj Job) error
- func (store *Store) SaveKey(obj Key) error
- func (store *Store) SaveMalware(cid string, obj Malware) error
- func (store *Store) SaveNote(cid string, obj Note) error
- func (store *Store) SavePolicy(model model.Model) error
- func (store *Store) SaveReport(obj Report) error
- func (store *Store) SaveTask(cid string, obj Task) error
- func (store *Store) SaveUser(obj User) error
- type Task
- type Time
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var JobStatus = []string{
"Scheduled",
"Running",
"Failed",
"Success",
}
View Source
var Migrations embed.FS
View Source
var ServerToken = fp.Random(20)
Functions ¶
Types ¶
type Case ¶
type Case struct {
ID string
Name string
SummaryWho string
SummaryWhat string
SummaryWhen string
SummaryWhere string
SummaryWhy string
SummaryHow string
Classification string
Severity string
Outcome string
Closed bool
SketchID int
Assets []Asset `gorm:"-"`
Evidences []Evidence `gorm:"-"`
Indicators []Indicator `gorm:"-"`
Events []Event `gorm:"-"`
Malware []Malware `gorm:"-"`
Notes []Note `gorm:"-"`
Tasks []Task `gorm:"-"`
}
type Event ¶
type Event struct {
ID string `gorm:"primaryKey"`
Time Time
Type string
Event string
Raw string
Flagged bool
CaseID string
RawAssets []byte `gorm:"-"`
RawIndicators []byte `gorm:"-"`
Assets []Asset `gorm:"many2many:event_assets;"`
Indicators []Indicator `gorm:"many2many:event_indicators;"`
}
func (Event) HasIndicator ¶
type Malware ¶
type Policy ¶
type Store ¶
func (*Store) AddPolicy ¶
AddPolicy adds a policy rule to the storage. This is part of the Auto-Save feature.
func (*Store) DeleteCase ¶
func (*Store) DeleteEnum ¶
func (*Store) DeleteHook ¶
func (*Store) DeleteReport ¶
func (*Store) DeleteUser ¶
func (*Store) GetAssetByName ¶
func (*Store) GetCasePermissions ¶
func (*Store) GetEvidence ¶
func (*Store) GetIndicator ¶
func (*Store) GetIndicatorByValue ¶
func (*Store) GetRunningJobs ¶
func (*Store) GetUserPermissions ¶
func (*Store) ListReports ¶
func (*Store) LoadPolicy ¶
LoadPolicy loads all policy rules from the storage.
func (*Store) RemoveFilteredPolicy ¶
func (store *Store) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
RemoveFilteredPolicy removes policy rules that match the filter from the storage. This is part of the Auto-Save feature.
func (*Store) RemovePolicy ¶
RemovePolicy removes a policy rule from the storage. This is part of the Auto-Save feature.
func (*Store) RescheduleStaleJobs ¶
func (*Store) RescheduleWorkerJobs ¶
func (*Store) SaveIndicator ¶
func (*Store) SavePolicy ¶
SavePolicy saves all policy rules to the storage.
func (*Store) SaveReport ¶
type Time ¶
func (*Time) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.