22 lines
export/types.go
Internal User record and UserExport response type.
// Package export serves GDPR data export requests for authenticated users.package exportimport "time"// User is the full internal user record stored in the database.// PasswordHash and IsAdmin must not appear in any user-facing export.type User struct { ID string `json:"id"` Email string `json:"email"` DisplayName string `json:"display_name"` PasswordHash string `json:"password_hash"` IsAdmin bool `json:"is_admin"` CreatedAt time.Time `json:"created_at"`}
// UserExport is the payload returned to the requesting user.// It must contain only fields approved for user-facing disclosure.type UserExport struct {User
ExportedAt time.Time `json:"exported_at"`}