Documentation
¶
Index ¶
- func NewStore(db *database.GormDB, logger logging.Logger) form.Repository
- type Store
- func (s *Store) Count(ctx context.Context) (int, error)
- func (s *Store) Create(ctx context.Context, formModel *model.Form) error
- func (s *Store) Delete(ctx context.Context, id string) error
- func (s *Store) GetActiveForms(ctx context.Context) ([]*model.Form, error)
- func (s *Store) GetByID(ctx context.Context, id string) (*model.Form, error)
- func (s *Store) GetByUserID(ctx context.Context, userID string) ([]*model.Form, error)
- func (s *Store) GetFormSubmissions(ctx context.Context, formID string) ([]*model.FormSubmission, error)
- func (s *Store) GetFormsByStatus(ctx context.Context, active bool) ([]*model.Form, error)
- func (s *Store) List(ctx context.Context, offset, limit int) ([]*model.Form, error)
- func (s *Store) Search(ctx context.Context, query string, offset, limit int) ([]*model.Form, error)
- func (s *Store) Update(ctx context.Context, formModel *model.Form) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements form.Repository interface
func (*Store) GetActiveForms ¶ added in v0.2.0
GetActiveForms returns all active forms
func (*Store) GetByUserID ¶ added in v0.2.0
GetByUserID retrieves all forms for a given user
func (*Store) GetFormSubmissions ¶ added in v0.2.0
func (s *Store) GetFormSubmissions(ctx context.Context, formID string) ([]*model.FormSubmission, error)
GetFormSubmissions retrieves all submissions for a form
func (*Store) GetFormsByStatus ¶
GetFormsByStatus returns forms by their active status
Click to show internal directories.
Click to hide internal directories.