routing

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redirector

type Redirector struct {
	Router  *Router
	Session *session.SessionManager
	GIN     *gin.Context
}

func (*Redirector) Back

func (r *Redirector) Back(code int, fallback ...string)

func (*Redirector) Guest

func (r *Redirector) Guest(code int, path string)

func (*Redirector) Intended

func (r *Redirector) Intended(code int, defaults string)

func (*Redirector) Previous

func (r *Redirector) Previous(fallback ...string) string

func (*Redirector) Redirect

func (r *Redirector) Redirect(code int, path string)

func (*Redirector) SetIntendedUrl

func (r *Redirector) SetIntendedUrl(url string)

type Router

type Router struct {
	BaseURL *url.URL
}

func NewRouter

func NewRouter(baseURL string) (*Router, error)

func (*Router) RelativePath

func (r *Router) RelativePath(path string) (string, bool)

returns the relative path of the given path

func (*Router) URL

func (r *Router) URL(path string) *url.URL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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