risktemplates

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivitySearchResults

func ActivitySearchResults(activities []db.Activity, riskID, assessmentID string) templ.Component

ActivitySearchResults is the HTMX partial for activity search results.

func AssessmentDetail

func AssessmentDetail(vm AssessmentDetailVM) templ.Component

func AssessmentList

func AssessmentList(vm AssessmentListPageVM) templ.Component

func LinkedActivityChip

func LinkedActivityChip(a db.Activity, riskID, assessmentID string) templ.Component

LinkedActivityChip is the HTMX partial returned after linking an activity.

func LinkedMeasureChip

func LinkedMeasureChip(m db.Measure, riskID, assessmentID string) templ.Component

LinkedMeasureChip is the HTMX partial returned after linking a measure.

func LinkedMeasureWithActivity

func LinkedMeasureWithActivity(m db.Measure, a db.Activity, riskID, assessmentID string) templ.Component

LinkedMeasureWithActivity is returned by QuickCreateMeasure when a due date was set. The primary swap adds the measure chip; the OOB swap appends the activity chip.

func MeasureSearchResults

func MeasureSearchResults(measures []db.Measure, riskID, assessmentID string) templ.Component

MeasureSearchResults is the HTMX partial for measure search results.

func NewRiskRow

func NewRiskRow(risk db.Risk, assessmentID string) templ.Component

NewRiskRow is the HTMX partial returned after adding a risk.

func RiskDetail

func RiskDetail(vm RiskDetailVM) templ.Component

func RiskRegister

func RiskRegister(risks []db.ListAllRisksRow, lowMax, highMin int) templ.Component

── Risk register (flat list across all assessments) ─────────────────────────

func Step2AssetSearchResults

func Step2AssetSearchResults(assessmentID, riskID string, isReview bool, assetQuery string, results []db.Asset) templ.Component

func WizardDecision

func WizardDecision(vm DecisionVM) templ.Component

func WizardEvaluate

func WizardEvaluate(vm EvaluationVM) templ.Component

func WizardStep1

func WizardStep1(vm WizardStep1VM) templ.Component

func WizardStep2

func WizardStep2(vm WizardStep2VM) templ.Component

func WizardStep3

func WizardStep3(vm WizardStep3VM) templ.Component

func WizardStep4

func WizardStep4(vm WizardStep4VM) templ.Component

func WizardStepThreat added in v1.0.2

func WizardStepThreat(vm WizardStepThreatVM) templ.Component

Types

type AssessmentDetailVM

type AssessmentDetailVM struct {
	Assessment      db.RiskAssessment
	Risks           []db.Risk
	CurrentMatrix   []layout.RiskMatrixCell
	TargetMatrix    []layout.RiskMatrixCell
	RiskMeasures    map[uuid.UUID][]db.Measure
	RiskActivities  map[uuid.UUID][]db.Activity
	Flash           string
	FlashType       string
	OwnerName       string
	OrgName         string
	Participants    []db.User
	LowMax          int
	HighMin         int
	CurrentUserID   string
	CanTogglePublic bool
	AuditLog        []db.ListAuditLogForAssessmentRow
}

type AssessmentListPageVM

type AssessmentListPageVM struct {
	Assessments   []AssessmentListVM
	Flash         string
	FlashType     string
	CurrentUserID string
}

type AssessmentListVM

type AssessmentListVM struct {
	Assessment  db.RiskAssessment
	RiskCount   int64
	RedCount    int64
	YellowCount int64
}

type DecisionVM

type DecisionVM struct {
	Assessment db.RiskAssessment
	Risk       db.Risk
	Risks      []db.Risk

	Assets     []db.Asset
	Measures   []db.Measure
	Activities []db.Activity
	Users      []db.User
	Overdue    bool

	AcceptanceCriteria string
	LowMax             int
	HighMin            int

	Position int
	Total    int

	PrevRiskID uuid.NullUUID
	NextRiskID uuid.NullUUID

	IsReview  bool
	CanAccept bool
	OwnerName string
}

type EvaluationVM

type EvaluationVM struct {
	Assessment         db.RiskAssessment
	Risks              []db.Risk
	IsReview           bool
	AcceptanceCriteria string
	LowMax             int
	HighMin            int
}

type RiskDetailVM

type RiskDetailVM struct {
	Assessment          db.RiskAssessment
	Risk                db.Risk
	Measures            []db.Measure
	Activities          []db.Activity
	Assets              []db.Asset
	AssetQuery          string
	AssetResults        []db.Asset
	LowMax              int
	HighMin             int
	ReviewEvents        []db.ListRiskReassessmentEventsRow
	AuditLog            []db.ListAuditLogForRiskRow
	AssessedByName      string
	ReviewRationale     string
	ReassessmentMessage string
	ReassessmentError   bool
}

type WizardStep1VM

type WizardStep1VM struct {
	Assessment         db.RiskAssessment
	ThreatEnabled      bool
	Users              []db.User
	Orgs               []db.Organization
	Participants       []db.User
	ParticipantQuery   string
	ParticipantResults []db.User
	Assets             []db.Asset
	AssetQuery         string
	AssetResults       []db.Asset
	IsNew              bool
	Flash              string
	AcceptanceCriteria string
}

type WizardStep2VM

type WizardStep2VM struct {
	Assessment   db.RiskAssessment
	Risks        []db.Risk
	Users        []db.User
	LinkedAssets map[uuid.UUID][]db.Asset
	AssetQueries map[uuid.UUID]string
	AssetResults map[uuid.UUID][]db.Asset
	IsReview     bool
	Flash        string
}

type WizardStep3VM

type WizardStep3VM struct {
	Assessment  db.RiskAssessment
	Risks       []db.Risk
	IsReview    bool
	LowMax      int
	HighMin     int
	ScaleLabels []db.RiskScaleLabel
}

type WizardStep4VM

type WizardStep4VM struct {
	Assessment     db.RiskAssessment
	Risks          []db.Risk
	RiskMeasures   map[uuid.UUID][]db.Measure
	RiskActivities map[uuid.UUID][]db.Activity
	Users          []db.User
	IsReview       bool
	OverdueRisks   map[uuid.UUID]bool
	LowMax         int
	HighMin        int
}

type WizardStepThreatVM added in v1.0.2

type WizardStepThreatVM struct {
	Assessment db.RiskAssessment
	Assets     []db.Asset
	IsReview   bool
	Flash      string
}

Jump to

Keyboard shortcuts

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