router

package
v0.0.0-...-22a6414 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package router contém as rotas do sistema.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFunc

type HandlerFunc func(w http.ResponseWriter, r *http.Request)

HandlerFunc é a interface de uma função handler http.

type Route

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

Route representa uma rota no sistema.

func NewRoute

func NewRoute(path string, methods []string, handler HandlerFunc) *Route

NewRoute cria uma rota.

func Routes

func Routes() []*Route

Routes é um mapa das rotas do sistema.

func (*Route) Handler

func (r *Route) Handler() HandlerFunc

Handler da rota

func (*Route) Methods

func (r *Route) Methods() []string

Methods HTTP aceitos pela rota.

func (*Route) Path

func (r *Route) Path() string

Path da rota

Jump to

Keyboard shortcuts

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