Documentation ¶
Index ¶
- Constants
- Variables
- func Decode(r *http.Request, dst any) error
- func Err(w http.ResponseWriter, r *http.Request, err error)
- func ImportCSV(store *model.Store, w http.ResponseWriter, r *http.Request, uri string, ...)
- func LoadTemplate(name string) (doct.Template, error)
- func Logger(next http.Handler) http.Handler
- func Recover(next http.Handler) http.Handler
- func Render(store *model.Store, w http.ResponseWriter, r *http.Request, status int, ...)
- func ServeDir(prefix string, dir string) http.Handler
- func ServeFile(name string) http.Handler
- func ValidateAsset(dto model.Asset) valid.Result
- func ValidateCase(dto model.Case) valid.Result
- func ValidateEvent(dto model.Event) valid.Result
- func ValidateEvidence(dto model.Evidence) valid.Result
- func ValidateIndicator(dto model.Indicator) valid.Result
- func ValidateKey(dto model.Key) valid.Result
- func ValidateMalware(dto model.Malware) valid.Result
- func ValidateNote(dto model.Note) valid.Result
- func ValidateReport(dto model.Report) valid.Result
- func ValidateTask(dto model.Task) valid.Result
- func Warn(w http.ResponseWriter, r *http.Request, err error)
- type AssetCtrl
- func (ctrl AssetCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl AssetCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl AssetCtrl) Export(w http.ResponseWriter, r *http.Request)
- func (ctrl AssetCtrl) Import(w http.ResponseWriter, r *http.Request)
- func (ctrl AssetCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl AssetCtrl) Save(w http.ResponseWriter, r *http.Request)
- type CaseCtrl
- func (ctrl CaseCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl CaseCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl CaseCtrl) Export(w http.ResponseWriter, r *http.Request)
- func (ctrl CaseCtrl) Import(w http.ResponseWriter, r *http.Request)
- func (ctrl CaseCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl CaseCtrl) Save(w http.ResponseWriter, r *http.Request)
- type Env
- type EventCtrl
- func (ctrl EventCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl EventCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl EventCtrl) Export(w http.ResponseWriter, r *http.Request)
- func (ctrl EventCtrl) Import(w http.ResponseWriter, r *http.Request)
- func (ctrl EventCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl EventCtrl) Save(w http.ResponseWriter, r *http.Request)
- type EvidenceCtrl
- func (ctrl EvidenceCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl EvidenceCtrl) Download(w http.ResponseWriter, r *http.Request)
- func (ctrl EvidenceCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl EvidenceCtrl) Export(w http.ResponseWriter, r *http.Request)
- func (ctrl EvidenceCtrl) Extensions(w http.ResponseWriter, r *http.Request)
- func (ctrl EvidenceCtrl) Import(w http.ResponseWriter, r *http.Request)
- func (ctrl EvidenceCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl EvidenceCtrl) Run(w http.ResponseWriter, r *http.Request)
- func (ctrl EvidenceCtrl) Save(w http.ResponseWriter, r *http.Request)
- type IndicatorCtrl
- func (ctrl IndicatorCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl IndicatorCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl IndicatorCtrl) Export(w http.ResponseWriter, r *http.Request)
- func (ctrl IndicatorCtrl) Import(w http.ResponseWriter, r *http.Request)
- func (ctrl IndicatorCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl IndicatorCtrl) Save(w http.ResponseWriter, r *http.Request)
- type KeyCtrl
- type LoggingResponseWriter
- type MalwareCtrl
- func (ctrl MalwareCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl MalwareCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl MalwareCtrl) Export(w http.ResponseWriter, r *http.Request)
- func (ctrl MalwareCtrl) Import(w http.ResponseWriter, r *http.Request)
- func (ctrl MalwareCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl MalwareCtrl) Save(w http.ResponseWriter, r *http.Request)
- type NoteCtrl
- func (ctrl NoteCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl NoteCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl NoteCtrl) Export(w http.ResponseWriter, r *http.Request)
- func (ctrl NoteCtrl) Import(w http.ResponseWriter, r *http.Request)
- func (ctrl NoteCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl NoteCtrl) Save(w http.ResponseWriter, r *http.Request)
- type OpenIDConfig
- type ReportCtrl
- func (ctrl ReportCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl ReportCtrl) Dialog(w http.ResponseWriter, r *http.Request)
- func (ctrl ReportCtrl) Download(w http.ResponseWriter, r *http.Request)
- func (ctrl ReportCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl ReportCtrl) Generate(w http.ResponseWriter, r *http.Request)
- func (ctrl ReportCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl ReportCtrl) Save(w http.ResponseWriter, r *http.Request)
- type TaskCtrl
- func (ctrl TaskCtrl) Delete(w http.ResponseWriter, r *http.Request)
- func (ctrl TaskCtrl) Edit(w http.ResponseWriter, r *http.Request)
- func (ctrl TaskCtrl) Export(w http.ResponseWriter, r *http.Request)
- func (ctrl TaskCtrl) Import(w http.ResponseWriter, r *http.Request)
- func (ctrl TaskCtrl) List(w http.ResponseWriter, r *http.Request)
- func (ctrl TaskCtrl) Save(w http.ResponseWriter, r *http.Request)
- type UserCtrl
Constants ¶
View Source
const BucketReportTemplates = "templates"
Variables ¶
View Source
var ApiKeyHeader = "X-API-Key"
View Source
var SessionName = "default"
View Source
var SessionStore = sessions.NewCookieStore([]byte(os.Getenv("WEB_SESSION_SECRET")))
View Source
var ZeroID string = "0"
View Source
var ZeroTime time.Time
Functions ¶
Types ¶
type AssetCtrl ¶
type AssetCtrl struct {
// contains filtered or unexported fields
}
func NewAssetCtrl ¶
type CaseCtrl ¶
type CaseCtrl struct {
// contains filtered or unexported fields
}
func NewCaseCtrl ¶
type Env ¶
type EventCtrl ¶
type EventCtrl struct {
// contains filtered or unexported fields
}
func NewEventCtrl ¶
type EvidenceCtrl ¶
type EvidenceCtrl struct {
// contains filtered or unexported fields
}
func NewEvidenceCtrl ¶
func NewEvidenceCtrl(store *model.Store) *EvidenceCtrl
func (EvidenceCtrl) Delete ¶
func (ctrl EvidenceCtrl) Delete(w http.ResponseWriter, r *http.Request)
func (EvidenceCtrl) Download ¶
func (ctrl EvidenceCtrl) Download(w http.ResponseWriter, r *http.Request)
func (EvidenceCtrl) Edit ¶
func (ctrl EvidenceCtrl) Edit(w http.ResponseWriter, r *http.Request)
func (EvidenceCtrl) Export ¶
func (ctrl EvidenceCtrl) Export(w http.ResponseWriter, r *http.Request)
func (EvidenceCtrl) Extensions ¶
func (ctrl EvidenceCtrl) Extensions(w http.ResponseWriter, r *http.Request)
func (EvidenceCtrl) Import ¶
func (ctrl EvidenceCtrl) Import(w http.ResponseWriter, r *http.Request)
func (EvidenceCtrl) List ¶
func (ctrl EvidenceCtrl) List(w http.ResponseWriter, r *http.Request)
func (EvidenceCtrl) Run ¶
func (ctrl EvidenceCtrl) Run(w http.ResponseWriter, r *http.Request)
func (EvidenceCtrl) Save ¶
func (ctrl EvidenceCtrl) Save(w http.ResponseWriter, r *http.Request)
type IndicatorCtrl ¶
type IndicatorCtrl struct {
// contains filtered or unexported fields
}
func NewIndicatorCtrl ¶
func NewIndicatorCtrl(store *model.Store) *IndicatorCtrl
func (IndicatorCtrl) Delete ¶
func (ctrl IndicatorCtrl) Delete(w http.ResponseWriter, r *http.Request)
func (IndicatorCtrl) Edit ¶
func (ctrl IndicatorCtrl) Edit(w http.ResponseWriter, r *http.Request)
func (IndicatorCtrl) Export ¶
func (ctrl IndicatorCtrl) Export(w http.ResponseWriter, r *http.Request)
func (IndicatorCtrl) Import ¶
func (ctrl IndicatorCtrl) Import(w http.ResponseWriter, r *http.Request)
func (IndicatorCtrl) List ¶
func (ctrl IndicatorCtrl) List(w http.ResponseWriter, r *http.Request)
func (IndicatorCtrl) Save ¶
func (ctrl IndicatorCtrl) Save(w http.ResponseWriter, r *http.Request)
type LoggingResponseWriter ¶
type LoggingResponseWriter struct { Bytes int Status int // contains filtered or unexported fields }
LoggingResponseWriter struct is used to log the response
func (*LoggingResponseWriter) Header ¶
func (w *LoggingResponseWriter) Header() http.Header
func (*LoggingResponseWriter) Write ¶
func (w *LoggingResponseWriter) Write(buf []byte) (int, error)
func (*LoggingResponseWriter) WriteHeader ¶
func (w *LoggingResponseWriter) WriteHeader(statusCode int)
type MalwareCtrl ¶
type MalwareCtrl struct {
// contains filtered or unexported fields
}
func NewMalwareCtrl ¶
func NewMalwareCtrl(store *model.Store) *MalwareCtrl
func (MalwareCtrl) Delete ¶
func (ctrl MalwareCtrl) Delete(w http.ResponseWriter, r *http.Request)
func (MalwareCtrl) Edit ¶
func (ctrl MalwareCtrl) Edit(w http.ResponseWriter, r *http.Request)
func (MalwareCtrl) Export ¶
func (ctrl MalwareCtrl) Export(w http.ResponseWriter, r *http.Request)
func (MalwareCtrl) Import ¶
func (ctrl MalwareCtrl) Import(w http.ResponseWriter, r *http.Request)
func (MalwareCtrl) List ¶
func (ctrl MalwareCtrl) List(w http.ResponseWriter, r *http.Request)
func (MalwareCtrl) Save ¶
func (ctrl MalwareCtrl) Save(w http.ResponseWriter, r *http.Request)
type NoteCtrl ¶
type NoteCtrl struct {
// contains filtered or unexported fields
}
func NewNoteCtrl ¶
type OpenIDConfig ¶
type OpenIDConfig struct { ClientId string //id from the authorization service (OIDC provider) ClientSecret string //secret from the authorization service (OIDC provider) ClientUrl url.URL //your website's/service's URL for example: "http://localhost:8081/" or "https://mydomain.com/ Issuer url.URL //the URL identifier for the authorization service. for example: "https://accounts.google.com" - try adding "/.well-known/openid-configuration" to the path to make sure it's correct Scopes []string //OAuth scopes. If you're unsure go with: []string{oidc.ScopeOpenID, "profile", "email"} Identifier string // name of the openid claim used to securely identify a user (e.g. "sub"). PostLogoutUrl url.URL //user will be redirected to this URL after he logs out (i.e. accesses the '/logout' endpoint added in 'Init()') }
type ReportCtrl ¶
type ReportCtrl struct {
// contains filtered or unexported fields
}
func NewReportCtrl ¶
func NewReportCtrl(store *model.Store) *ReportCtrl
func (ReportCtrl) Delete ¶
func (ctrl ReportCtrl) Delete(w http.ResponseWriter, r *http.Request)
func (ReportCtrl) Dialog ¶
func (ctrl ReportCtrl) Dialog(w http.ResponseWriter, r *http.Request)
func (ReportCtrl) Download ¶
func (ctrl ReportCtrl) Download(w http.ResponseWriter, r *http.Request)
func (ReportCtrl) Edit ¶
func (ctrl ReportCtrl) Edit(w http.ResponseWriter, r *http.Request)
func (ReportCtrl) Generate ¶
func (ctrl ReportCtrl) Generate(w http.ResponseWriter, r *http.Request)
func (ReportCtrl) List ¶
func (ctrl ReportCtrl) List(w http.ResponseWriter, r *http.Request)
func (ReportCtrl) Save ¶
func (ctrl ReportCtrl) Save(w http.ResponseWriter, r *http.Request)
type TaskCtrl ¶
type TaskCtrl struct {
// contains filtered or unexported fields
}
func NewTaskCtrl ¶
type UserCtrl ¶
type UserCtrl struct {
// contains filtered or unexported fields
}
func NewUserCtrl ¶
func NewUserCtrl(store *model.Store, cfg OpenIDConfig) *UserCtrl
Click to show internal directories.
Click to hide internal directories.