Documentation
¶
Overview ¶
Package feedback implements the anonymous-feedback-to-GitHub-Issue proxy: a single IssueCreator interface backed by the GitHub Issues API, kept separate from the HTTP handler in server/feedback.go so the handler can be unit-tested against a fake creator.
Index ¶
Constants ¶
const ( Owner = "sweetrpg" Repo = "platform" )
Owner and Repo identify the sweetrpg/platform meta-repo that every feedback submission becomes an issue on - see design.md's "no per-service repo routing" decision.
Variables ¶
This section is empty.
Functions ¶
func RateLimitMiddleware ¶
func RateLimitMiddleware(pool *redis.Pool) gin.HandlerFunc
RateLimitMiddleware enforces a per-client budget on just the route it's mounted on, stricter than and layered on top of admin-api's existing service-wide limiter. Fails closed (503) if pool is nil or Redis is unreachable, matching api-core.go/ratelimit.Middleware's behavior.
Types ¶
type GitHubIssueClient ¶
type GitHubIssueClient struct {
// contains filtered or unexported fields
}
GitHubIssueClient creates issues on sweetrpg/platform via the GitHub REST API using a service-owned token scoped to Issues:write on that one repo (see design.md).
func NewGitHubIssueClient ¶
func NewGitHubIssueClient(token string) *GitHubIssueClient
NewGitHubIssueClient builds a client authenticated with the given token.
func (*GitHubIssueClient) CreateIssue ¶
func (c *GitHubIssueClient) CreateIssue(ctx context.Context, title, body string, labels []string) error
CreateIssue creates a labeled issue on sweetrpg/platform. A non-nil error means the caller should treat the submission as failed (502/503) - this never retries internally, per design.md's "no partial state to reconcile" decision.