Documentation
¶
Overview ¶
Package feedback posts a user-written support message to the KeibiDrop feedback endpoint. Sent on purpose and nothing else: the message, the optional reply contact, the app version, the platform, which surface sent it and, when the person asks for it, the app's log with names, codes and addresses removed (common.SanitizedLogTail).
Index ¶
Constants ¶
View Source
const DefaultEndpoint = "https://keibidrop.com/feedback"
View Source
const MaxLogs = 4 << 20
MaxLogs caps the log a report carries: the newest 4 MiB of sanitized text. The endpoint takes no more.
Variables ¶
View Source
var ErrSentWithoutLogs = errors.New("sent without the log: the endpoint refused its size")
ErrSentWithoutLogs: the endpoint refused the report with its log as too large, then took it without.
Functions ¶
Types ¶
type Report ¶
type Report struct {
Message string `json:"message"`
Contact string `json:"contact,omitempty"`
Version string `json:"version,omitempty"`
Surface string `json:"surface,omitempty"`
// Rating is 1 to 5 stars, 0 when the person gave none.
Rating int `json:"rating,omitempty"`
// Logs is sanitized log text, sent gzipped; empty sends none.
Logs string `json:"-"`
}
Click to show internal directories.
Click to hide internal directories.