feedback

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

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

func PackLogs added in v0.5.0

func PackLogs(text string) (string, error)

PackLogs is packLogs for a caller with no log file: the browser peer sends its in-memory log the way Send sends the desktop's file.

func Send

func Send(r Report) error

Send posts the report. Blocks up to 10s, 60s with a log. KEIBIDROP_FEEDBACK_URL overrides the endpoint for tests. A rating alone is a report; a message alone is a report; both is one too.

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:"-"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL