store

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

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")
)

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