Documentation
¶
Overview ¶
Package feedback provides a self-contained feedback widget for HOROS services.
It exposes both a chi-compatible Widget.Handler and a standard Widget.RegisterMux so callers can pick whichever router they use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
ID string `json:"id"`
Text string `json:"text"`
PageURL string `json:"page_url"`
UserAgent string `json:"user_agent"`
UserID *string `json:"user_id,omitempty"`
AppName string `json:"app_name"`
CreatedAt int64 `json:"created_at"`
}
Comment represents a single feedback entry.
type Config ¶
type Config struct {
DB *sql.DB
AppName string // e.g. "horum" or "horostracker"
UserIDFn UserIDFunc // nil = always anonymous
}
Config holds the settings needed to create a feedback Widget.
type UserIDFunc ¶
UserIDFunc extracts a user identifier from the HTTP request. Return "" for anonymous feedback.
type Widget ¶
type Widget struct {
// contains filtered or unexported fields
}
Widget manages the feedback system (schema, HTTP handlers, embedded assets).
Click to show internal directories.
Click to hide internal directories.