Documentation ¶ Index ¶ type Route type RouteType type Router func NewRouter(pagesDir string) *Router func (r *Router) Discover() error func (r *Router) Match(path string) (*Route, map[string]string) func (r *Router) Reload() error func (r *Router) Sort() func (r *Router) String() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Route ¶ type Route struct { Pattern string FilePath string Type RouteType ParamNames []string Priority int Regex *regexp.Regexp IsEndpoint bool } type RouteType ¶ type RouteType int const ( RouteStatic RouteType = iota RouteDynamic RouteCatchAll RouteEndpoint RouteMarkdown ) type Router ¶ type Router struct { Routes []*Route PagesDir string // contains filtered or unexported fields } func NewRouter ¶ func NewRouter(pagesDir string) *Router func (*Router) Discover ¶ func (r *Router) Discover() error func (*Router) Match ¶ func (r *Router) Match(path string) (*Route, map[string]string) func (*Router) Reload ¶ func (r *Router) Reload() error func (*Router) Sort ¶ func (r *Router) Sort() func (*Router) String ¶ func (r *Router) String() string Source Files ¶ View all Source files router.go Click to show internal directories. Click to hide internal directories.