service

package
v0.0.0-...-27d2001 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSSPNotFound = errors.New("SSP not found")

Functions

This section is empty.

Types

type ComplianceStatusByTargets

type ComplianceStatusByTargets struct {
	Control    string      `json:"control"`
	Target     string      `json:"target"`
	Compliance []RiskState `json:"compliance"`
}

type ComplianceStatusOverTime

type ComplianceStatusOverTime struct {
	Date         string `json:"date"`
	Findings     int    `json:"findings"`
	Observations int    `json:"observations"`
	Risks        int    `json:"risks"`
}

type DocWithMetadata

type DocWithMetadata struct {
	Uuid     domain.Uuid     `json:"uuid"`
	Metadata domain.Metadata `bson:"metadata"`
}

type MetadataService

type MetadataService struct {
}

func NewMetadataService

func NewMetadataService() *MetadataService

func (*MetadataService) AttachMetadata

func (s *MetadataService) AttachMetadata(uuid string, collection string, revision domain.Revision) error

type PlanService

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

func NewPlanService

func NewPlanService(p event.Publisher) *PlanService

func (*PlanService) ActivatePlan

func (s *PlanService) ActivatePlan(planId string) error

func (*PlanService) ComplianceOverTime

func (s *PlanService) ComplianceOverTime(planId string, resultId string) ([]bson.M, error)

func (*PlanService) ComplianceStatusByTargets

func (s *PlanService) ComplianceStatusByTargets(planId string, resultId string) ([]ComplianceStatusByTargets, error)

func (*PlanService) Create

func (s *PlanService) Create(plan *Plan) (string, error)

func (*PlanService) CreateActivity

func (s *PlanService) CreateActivity(planId string, taskId string, activity Activity) (string, error)

func (*PlanService) CreateTask

func (s *PlanService) CreateTask(planId string, task Task) (string, error)

func (*PlanService) Findings

func (s *PlanService) Findings(planId string, resultId string) ([]bson.M, error)

func (*PlanService) GetById

func (s *PlanService) GetById(id string) (*Plan, error)

func (*PlanService) Observations

func (s *PlanService) Observations(planId string, resultId string) ([]bson.M, error)

func (*PlanService) RemediationVsTime

func (s *PlanService) RemediationVsTime(planId string, resultId string) ([]RemediationVsTime, error)

func (*PlanService) ResultSummary

func (s *PlanService) ResultSummary(planId string, resultId string) (PlanSummary, error)

func (*PlanService) Results

func (s *PlanService) Results(planId string) ([]bson.M, error)

func (*PlanService) Risks

func (s *PlanService) Risks(planId string, resultId string) ([]Risk, error)

func (*PlanService) SaveResult

func (s *PlanService) SaveResult(planId string, result Result) error

func (*PlanService) SaveSubject

func (s *PlanService) SaveSubject(subject Subject) error

type PlanSummary

type PlanSummary struct {
	Published        string     `json:"published"`
	EndDate          string     `json:"endDate"`
	Description      string     `json:"description"`
	Status           string     `json:"status"`
	NumControls      int        `json:"numControls"`
	NumSubjects      int        `json:"numSubjects"`
	NumObservations  int        `json:"numObservations"`
	NumRisks         int        `json:"numRisks"`
	RiskScore        RiskScore  `json:"riskScore"`
	ComplianceStatus float64    `json:"complianceStatus"`
	RiskLevels       RiskLevels `json:"riskLevels"`
}

type RemediationVsTime

type RemediationVsTime struct {
	Control     string `json:"control"`
	Remediation string `json:"remediation"`
}

type RiskLevels

type RiskLevels struct {
	Low    int `json:"low"`
	Medium int `json:"medium"`
	High   int `json:"high"`
}

type RiskScore

type RiskScore struct {
	Score    int          `json:"score"`
	Severity RiskSeverity `json:"severity"`
}

type RiskSeverity

type RiskSeverity string
const (
	Medium RiskSeverity = "medium"
	Low    RiskSeverity = "low"
	High   RiskSeverity = "high"
)

type RiskState

type RiskState string
const (
	Pass          RiskState = "pass"
	Warn          RiskState = "warn"
	Fail          RiskState = "fail"
	Indeterminate RiskState = "indeterminate"
)

type SSPService

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

func NewSSPService

func NewSSPService() *SSPService

func (*SSPService) Create

func (s *SSPService) Create(ssp *domain.SystemSecurityPlan) (string, error)

func (*SSPService) Delete

func (s *SSPService) Delete(id string) error

func (*SSPService) GetByID

func (s *SSPService) GetByID(id string) (*domain.SystemSecurityPlan, error)

func (*SSPService) List

func (s *SSPService) List() ([]*domain.SystemSecurityPlan, error)

func (*SSPService) Update

Jump to

Keyboard shortcuts

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