Add pre-configured framework templates

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-04-09 11:28:55 -07:00
parent 92ed01a822
commit 85a5f3a514
6 changed files with 928 additions and 133 deletions

View File

@@ -45,6 +45,7 @@ type (
ImportFrameworkRequest struct {
Framework struct {
ID string `json:"id"`
Name string `json:"name"`
Controls []struct {
ID string `json:"id"`
@@ -191,11 +192,14 @@ func (s FrameworkService) Import(
return nil, fmt.Errorf("cannot create global id: %w", err)
}
fmt.Printf("Importing framework: %+v\n", req.Framework)
fmt.Printf("Importing controls: %+v\n", req.Framework.Controls)
now := time.Now()
framework := &coredata.Framework{
ID: frameworkID,
OrganizationID: organizationID,
ReferenceID: req.Framework.Name,
ReferenceID: req.Framework.ID,
Name: req.Framework.Name,
CreatedAt: now,
UpdatedAt: now,