Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileName ¶
FileName returns the canonical .linespec stub file name for a route. Example: POST /api/v1/users → "post_api_v1_users.linespec"
func FormatJSON ¶
FormatJSON formats stub results as a JSON array for --dry-run --format json output.
func FormatTable ¶
FormatTable formats stub results as a human-readable table for --dry-run output. Each row shows the action (write/skip), the output file path, and the source route.
Types ¶
type BoundaryHit ¶
type BoundaryHit struct {
Protocol string // postgresql, mysql, redis, http, kafka, rabbitmq
Direction string // read, write, both
Target string // table name, URL base, topic, or "" when unresolved
Dynamic bool // true when the call site could not be statically resolved
}
BoundaryHit is a protocol boundary hit detected in a handler's call chain. Produced by pkg/discover/boundaries (Phase 2); consumed here for stub generation.
type Input ¶
type Input struct {
Route routes.Route
Boundaries []BoundaryHit
}
Input is the combined route and boundary data for generating one stub file.
type Result ¶
type Result struct {
FilePath string
Method string // HTTP method of the route (uppercased)
Path string // URL path of the route
Content string
Skipped bool
}
Result is the outcome of generating a single stub. Content is always populated; Skipped is true when the file already existed.