Alex Dunmow 1a8347a9e5 Add plugin route, output, form, log and egress rules (checks 33 to 37)
Generated plugins (acceptance.json at the root) fail on: HTTP routes not
registered through pluginsdk route or a public route reading personal
columns; HTML built from unescaped non-constant strings; public POSTs
outside route.Form; personal data names in log calls; outbound requests
carrying personal data or values the spec does not send to that host.
First-party plugins get the same findings as warnings.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 06:26:33 +08:00

47 lines
1.4 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// source: quote_requests.sql
package db
import "context"
const insertQuoteRequest = `-- name: InsertQuoteRequest :exec
INSERT INTO quote_requests (name, email, phone, property_address, roof_issue)
VALUES ($1, $2, $3, $4, $5)
`
type InsertQuoteRequestParams struct {
Name string `json:"name"`
Email string `json:"email"`
Phone string `json:"phone"`
PropertyAddress string `json:"property_address"`
RoofIssue string `json:"roof_issue"`
}
func (q *Queries) InsertQuoteRequest(ctx context.Context, arg InsertQuoteRequestParams) error {
_, err := q.db.Exec(ctx, insertQuoteRequest, arg.Name, arg.Email, arg.Phone, arg.PropertyAddress, arg.RoofIssue)
return err
}
const listQuoteRequests = `-- name: ListQuoteRequests :many
SELECT id, name, email, phone, property_address, roof_issue, submitted_at
FROM quote_requests
ORDER BY submitted_at DESC
`
func (q *Queries) ListQuoteRequests(ctx context.Context) ([]QuoteRequest, error) {
rows, err := q.db.Query(ctx, listQuoteRequests)
if err != nil {
return nil, err
}
defer rows.Close()
var items []QuoteRequest
for rows.Next() {
var i QuoteRequest
if err := rows.Scan(&i.ID, &i.Name, &i.Email, &i.Phone, &i.PropertyAddress, &i.RoofIssue, &i.SubmittedAt); err != nil {
return nil, err
}
items = append(items, i)
}
return items, rows.Err()
}