Documentation ¶
Index ¶
Constants ¶
View Source
const (
// The database table name for form fields.
TableName = "form_fields"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Find(formID int) (domain.FormFields, error) Insert(formID int, f domain.FormField) error Delete(formID int) error Exists(formID int, f domain.FormField) bool }
Repository defines methods for form fields to interact with the database.
type Store ¶
Store defines the data layer for form fields.
func (*Store) Delete ¶
Delete
Returns nil if the form fields were successfully deleted. Returns errors.INTERNAL if the SQL query was invalid. Returns errors.NOTFOUND if the form field was not found.
func (*Store) Exists ¶
Exists
Returns a bool indicating if the form field exists by key. Logs errors.INTERNAL if there was an error executing the query.
Click to show internal directories.
Click to hide internal directories.