handler

package
v0.0.0-...-a0c82dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZeroID ulid.ULID
View Source
var ZeroTime time.Time

Functions

func ErrorHandler

func ErrorHandler(err error, c echo.Context)

func LoadTemplates

func LoadTemplates(root string) error

func ValidateAsset

func ValidateAsset(dto templ.AssetDTO) valid.Result

func ValidateCase

func ValidateCase(dto templ.CaseDTO) valid.Result

func ValidateEvent

func ValidateEvent(dto templ.EventDTO) valid.Result

func ValidateEvidence

func ValidateEvidence(dto templ.EvidenceDTO) valid.Result

func ValidateIndicator

func ValidateIndicator(dto templ.IndicatorDTO) valid.Result

func ValidateMalware

func ValidateMalware(dto templ.MalwareDTO) valid.Result

func ValidateNote

func ValidateNote(dto templ.NoteDTO) valid.Result

func ValidateTask

func ValidateTask(dto templ.TaskDTO) valid.Result

Types

type AssetCtrl

type AssetCtrl struct {
	// contains filtered or unexported fields
}

func NewAssetCtrl

func NewAssetCtrl(store model.AssetStore) *AssetCtrl

func (AssetCtrl) Delete

func (ctrl AssetCtrl) Delete(c echo.Context) error

func (AssetCtrl) Edit

func (ctrl AssetCtrl) Edit(c echo.Context) error

func (AssetCtrl) Export

func (ctrl AssetCtrl) Export(c echo.Context) error

func (AssetCtrl) Import

func (ctrl AssetCtrl) Import(c echo.Context) error

func (AssetCtrl) List

func (ctrl AssetCtrl) List(c echo.Context) error

func (AssetCtrl) Save

func (ctrl AssetCtrl) Save(c echo.Context) error

type CaseCtrl

type CaseCtrl struct {
	// contains filtered or unexported fields
}

func NewCaseCtrl

func NewCaseCtrl(store model.CaseStore) *CaseCtrl

func (CaseCtrl) Delete

func (ctrl CaseCtrl) Delete(c echo.Context) error

func (CaseCtrl) Edit

func (ctrl CaseCtrl) Edit(c echo.Context) error

func (CaseCtrl) Export

func (ctrl CaseCtrl) Export(c echo.Context) error

func (CaseCtrl) ImportCases

func (ctrl CaseCtrl) ImportCases(c echo.Context) error

func (CaseCtrl) List

func (ctrl CaseCtrl) List(c echo.Context) error

func (CaseCtrl) Save

func (ctrl CaseCtrl) Save(c echo.Context) error

type EventCtrl

type EventCtrl struct {
	// contains filtered or unexported fields
}

func NewEventCtrl

func NewEventCtrl(assetStore model.AssetStore, eventStore model.EventStore, indicatorStore model.IndicatorStore) *EventCtrl

func (EventCtrl) Delete

func (ctrl EventCtrl) Delete(c echo.Context) error

func (EventCtrl) Edit

func (ctrl EventCtrl) Edit(c echo.Context) error

func (EventCtrl) Export

func (ctrl EventCtrl) Export(c echo.Context) error

func (EventCtrl) Import

func (ctrl EventCtrl) Import(c echo.Context) error

func (EventCtrl) List

func (ctrl EventCtrl) List(c echo.Context) error

func (EventCtrl) Save

func (ctrl EventCtrl) Save(c echo.Context) error

type EvidenceCtrl

type EvidenceCtrl struct {
	// contains filtered or unexported fields
}

func NewEvidenceCtrl

func NewEvidenceCtrl(store model.EvidenceStore) *EvidenceCtrl

func (EvidenceCtrl) Delete

func (ctrl EvidenceCtrl) Delete(c echo.Context) error

func (EvidenceCtrl) Download

func (ctrl EvidenceCtrl) Download(c echo.Context) error

func (EvidenceCtrl) Edit

func (ctrl EvidenceCtrl) Edit(c echo.Context) error

func (EvidenceCtrl) Export

func (ctrl EvidenceCtrl) Export(c echo.Context) error

func (EvidenceCtrl) Import

func (ctrl EvidenceCtrl) Import(c echo.Context) error

func (EvidenceCtrl) List

func (ctrl EvidenceCtrl) List(c echo.Context) error

func (EvidenceCtrl) Save

func (ctrl EvidenceCtrl) Save(c echo.Context) error

type IndicatorCtrl

type IndicatorCtrl struct {
	// contains filtered or unexported fields
}

func NewIndicatorCtrl

func NewIndicatorCtrl(store model.IndicatorStore) *IndicatorCtrl

func (IndicatorCtrl) Delete

func (ctrl IndicatorCtrl) Delete(c echo.Context) error

func (IndicatorCtrl) Edit

func (ctrl IndicatorCtrl) Edit(c echo.Context) error

func (IndicatorCtrl) Export

func (ctrl IndicatorCtrl) Export(c echo.Context) error

func (IndicatorCtrl) Import

func (ctrl IndicatorCtrl) Import(c echo.Context) error

func (IndicatorCtrl) List

func (ctrl IndicatorCtrl) List(c echo.Context) error

func (IndicatorCtrl) Save

func (ctrl IndicatorCtrl) Save(c echo.Context) error

type MalwareCtrl

type MalwareCtrl struct {
	// contains filtered or unexported fields
}

func NewMalwareCtrl

func NewMalwareCtrl(store model.MalwareStore) *MalwareCtrl

func (MalwareCtrl) Delete

func (ctrl MalwareCtrl) Delete(c echo.Context) error

func (MalwareCtrl) Export

func (ctrl MalwareCtrl) Export(c echo.Context) error

func (MalwareCtrl) Import

func (ctrl MalwareCtrl) Import(c echo.Context) error

func (MalwareCtrl) List

func (ctrl MalwareCtrl) List(c echo.Context) error

func (MalwareCtrl) Save

func (ctrl MalwareCtrl) Save(c echo.Context) error

func (MalwareCtrl) View

func (ctrl MalwareCtrl) View(c echo.Context) error

type NoteCtrl

type NoteCtrl struct {
	// contains filtered or unexported fields
}

func NewNoteCtrl

func NewNoteCtrl(store model.NoteStore) *NoteCtrl

func (NoteCtrl) Delete

func (ctrl NoteCtrl) Delete(c echo.Context) error

func (NoteCtrl) Export

func (ctrl NoteCtrl) Export(c echo.Context) error

func (NoteCtrl) Import

func (ctrl NoteCtrl) Import(c echo.Context) error

func (NoteCtrl) List

func (ctrl NoteCtrl) List(c echo.Context) error

func (NoteCtrl) Save

func (ctrl NoteCtrl) Save(c echo.Context) error

func (NoteCtrl) View

func (ctrl NoteCtrl) View(c echo.Context) error

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()')
	SessionName   string
}

type ReportCtrl

type ReportCtrl struct {
	// contains filtered or unexported fields
}

func NewReportCtrl

func NewReportCtrl(store model.CaseStore) *ReportCtrl

func (ReportCtrl) Generate

func (ctrl ReportCtrl) Generate(c echo.Context) error

func (ReportCtrl) List

func (ctrl ReportCtrl) List(c echo.Context) error

type TaskCtrl

type TaskCtrl struct {
	// contains filtered or unexported fields
}

func NewTaskCtrl

func NewTaskCtrl(store model.TaskStore) *TaskCtrl

func (TaskCtrl) Delete

func (ctrl TaskCtrl) Delete(c echo.Context) error

func (TaskCtrl) Edit

func (ctrl TaskCtrl) Edit(c echo.Context) error

func (TaskCtrl) Export

func (ctrl TaskCtrl) Export(c echo.Context) error

func (TaskCtrl) Import

func (ctrl TaskCtrl) Import(c echo.Context) error

func (TaskCtrl) List

func (ctrl TaskCtrl) List(c echo.Context) error

func (TaskCtrl) Save

func (ctrl TaskCtrl) Save(c echo.Context) error

type UserCtrl

type UserCtrl struct {
	// contains filtered or unexported fields
}

func NewUserCtrl

func NewUserCtrl(store model.UserStore, cfg OpenIDConfig) *UserCtrl

func (UserCtrl) Callback

func (ctrl UserCtrl) Callback(c echo.Context) error

func (UserCtrl) List

func (ctrl UserCtrl) List(c echo.Context) error

func (UserCtrl) Logout

func (ctrl UserCtrl) Logout(c echo.Context) error

func (UserCtrl) Protect

func (ctrl UserCtrl) Protect(e *echo.Echo) func(echo.HandlerFunc) echo.HandlerFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL