submission

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(db *database.GormDB, logger logging.Logger) form.SubmissionStore

NewStore creates a new form submission store

Types

type Store

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

Store implements form.SubmissionStore interface

func (*Store) Create

func (s *Store) Create(ctx context.Context, submission *model.FormSubmission) error

Create creates a new form submission

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id string) error

Delete deletes a form submission

func (*Store) GetByFormAndUser

func (s *Store) GetByFormAndUser(ctx context.Context, formID, userID string) (*model.FormSubmission, error)

GetByFormAndUser retrieves a form submission by form ID and user ID

func (*Store) GetByFormID

func (s *Store) GetByFormID(ctx context.Context, formID string) ([]*model.FormSubmission, error)

GetByFormID retrieves all submissions for a form

func (*Store) GetByFormIDPaginated

func (s *Store) GetByFormIDPaginated(
	ctx context.Context,
	formID string,
	params common.PaginationParams,
) (*common.PaginationResult, error)

GetByFormIDPaginated returns a paginated list of submissions for a form

func (*Store) GetByID

func (s *Store) GetByID(ctx context.Context, id string) (*model.FormSubmission, error)

GetByID retrieves a form submission by ID

func (*Store) List

List returns a paginated list of form submissions

func (*Store) Update

func (s *Store) Update(ctx context.Context, submission *model.FormSubmission) error

Update updates a form submission

Jump to

Keyboard shortcuts

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