routing

package
v1.1.0-rc Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package routing contains the routing for the application. This includes the routers and the urls belonging to each handler.

Index

Constants

View Source
const (
	Register = "/register"
	SignIn   = "/signin"
	SignOut  = "/signout"

	About = "/about"

	Explore = "/explore"

	Dashboard = "/dashboard"

	Projects = "/projects"
	Users    = "/users"
	Groups   = "/groups"

	Cases     = "/testcases"
	Sequences = "/testsequences"
	Protocols = "/protocols"
	Members   = "/members"
)

The different static parts a url can be made of

View Source
const (
	Show      = "/"
	New       = "/new"
	Edit      = "/edit"
	Update    = "/update"
	Duplicate = "/duplicate"
	History   = "/history"
	Execute   = "/execute"
	Save      = "/save"
	Print     = "/print"
	JSON      = "/json"
	Info      = "/info"
	Versions  = "/versions"
	Settings  = "/settings"
	Labels    = "/labels"
	Roles     = "/roles"
	Add       = "/add"
	Remove    = "/remove"
	Tester    = "/tester"
)

The actions that can be taken on an item

View Source
const (
	VarContainer = "/:container"
	VarProject   = "/:project"
	VarSequence  = "/:testsequence"
	VarCase      = "/:testcase"
)

The variables a url part can be

Variables

This section is empty.

Functions

func DefaultRedirect added in v1.0.0

func DefaultRedirect(url string) http.HandlerFunc

DefaultRedirect returns a simple handler that just redirects to given url using 303 as status.

func InitRouter

func InitRouter() http.Handler

InitRouter initializes the main router that handles all incoming requests

func MethodNotAllowed added in v1.0.0

func MethodNotAllowed(w http.ResponseWriter, r *http.Request,
	methods map[string]httptreemux.HandlerFunc)

MethodNotAllowed responds with a method not allowed page on every request. noinspection GoUnusedParameter

func NotFound added in v1.0.0

func NotFound(w http.ResponseWriter, r *http.Request)

NotFound responds with a not found page on every request.

func Redirect added in v1.0.0

func Redirect(redirectURL string, status int) http.HandlerFunc

Redirect returns a simple handler that just redirects to given url using given status.

Types

This section is empty.

Jump to

Keyboard shortcuts

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