store

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingParent is returned when the parent id or type is missing for file uploads
	ErrMissingParent = errors.New("parent id or type is missing")
	// ErrMissingOrganizationID is returned when organization ID cannot be determined for file upload
	ErrMissingOrganizationID = errors.New("organization ID is required for file upload")
	// ErrInternalServerError is returned when an error occurs that should not be exposed to the user and is not the user's fault, such as an error writing to the database or authz system
	ErrInternalServerError = errors.New("internal server error")
)
View Source
var FileCategoryDefaults = map[string]string{
	"ActionPlan":                 "action_plan",
	"Contact":                    "contact",
	"DirectoryAccount":           "directory_account",
	"DocumentData":               "document",
	"EmailTemplate":              "email_template",
	"Entity":                     "entity",
	"Event":                      "event",
	"Evidence":                   "evidence",
	"Export":                     "export",
	"Finding":                    "finding",
	"Group":                      "group",
	"Hush":                       "secret",
	"IdentityHolder":             "identity_holder",
	"Integration":                "integration",
	"IntegrationRun":             "integration_run",
	"InternalPolicy":             "internal_policy",
	"JobResult":                  "job_result",
	"Note":                       "note",
	"Organization":               "organization",
	"OrganizationSetting":        "organization_setting",
	"Platform":                   "platform",
	"Procedure":                  "procedure",
	"Program":                    "program",
	"Remediation":                "remediation",
	"Review":                     "review",
	"Scan":                       "scan",
	"Standard":                   "standard",
	"Subprocessor":               "subprocessor",
	"Template":                   "template",
	"TrustCenterDoc":             "trust_center_doc",
	"TrustCenterEntity":          "trust_center_entity",
	"TrustCenterNDARequest":      "trust_center_nda_request",
	"TrustCenterSetting":         "trust_center_setting",
	"TrustCenterWatermarkConfig": "trust_center_watermark_config",
	"User":                       "user",
	"Vulnerability":              "vulnerability",
}

FileCategoryDefaults maps schema names to default file categories.

Functions

func AddFilePermissions

func AddFilePermissions(ctx context.Context) (context.Context, error)

AddFilePermissions writes authorization tuples for uploaded files and removes them from the request context.

func CreateFileRecord

func CreateFileRecord(ctx context.Context, f pkgobjects.File) (*ent.File, error)

CreateFileRecord creates a file record in the database and returns the resulting ent.File entity.

func UpdateFileWithStorageMetadata

func UpdateFileWithStorageMetadata(ctx context.Context, entFile *ent.File, fileData pkgobjects.File) error

UpdateFileWithStorageMetadata updates a file entity with metadata returned from the storage provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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