routes

package
v3.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assembler

type Assembler struct {
	// contains filtered or unexported fields
}

Assembler discovers routes in a project directory using a framework description.

func New

func New(desc *framework.Description) (*Assembler, error)

New returns an Assembler for the given framework description.

func (*Assembler) Assemble

func (a *Assembler) Assemble(ctx context.Context, dir string) ([]Group, error)

Assemble scans dir for source files matching the framework's language and returns discovered route groups. Each group's name reflects the grouping_strategy declared in the framework description (package, controller, or file).

type Group

type Group struct {
	Name   string
	Routes []Route
}

Group is a cluster of related routes sharing a grouping identity.

type Route

type Route struct {
	Method          string
	Path            string
	HandlerRef      string
	MiddlewareChain []string
	Source          SourceLocation
}

Route is a discovered HTTP route endpoint.

type SourceLocation

type SourceLocation struct {
	File   string
	Line   uint32
	Column uint32
}

SourceLocation identifies where in source the route is registered (1-indexed).

Jump to

Keyboard shortcuts

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