routebuilder: github.com/askm3/routebuilder Index | Files | Directories

package routebuilder

import "github.com/askm3/routebuilder"

Index

Package Files

parentBuilder.go routebuilder.go

type Builder Uses

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

func New Uses

func New(method Method) *Builder

func (*Builder) Build Uses

func (rb *Builder) Build() *Route

func (*Builder) Handler Uses

func (rb *Builder) Handler(h http.HandlerFunc) *Builder

func (*Builder) Middleware Uses

func (rb *Builder) Middleware(middleware ...Middleware) *Builder

func (*Builder) Path Uses

func (rb *Builder) Path(p string) *Builder

type Method Uses

type Method string
const (
    GET     Method = "GET"
    POST    Method = "POST"
    PUT     Method = "PUT"
    PATCH   Method = "PATCH"
    DELETE  Method = "DELETE"
    OPTIONS Method = "OPTIONS"
    HEAD    Method = "HEAD"
    CONNECT Method = "CONNECT"
)

type Middleware Uses

type Middleware func(h http.HandlerFunc) http.HandlerFunc

type Parent Uses

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

func WithParent Uses

func WithParent(basePath string) *Parent

func (*Parent) Connect Uses

func (pb *Parent) Connect(subPath string, fn http.HandlerFunc) *Parent

func (*Parent) Delete Uses

func (pb *Parent) Delete(subPath string, fn http.HandlerFunc) *Parent

func (*Parent) Get Uses

func (pb *Parent) Get(subPath string, fn http.HandlerFunc) *Parent

func (*Parent) Head Uses

func (pb *Parent) Head(subPath string, fn http.HandlerFunc) *Parent

func (*Parent) Middleware Uses

func (pb *Parent) Middleware(middleware ...Middleware) *Parent

func (*Parent) Options Uses

func (pb *Parent) Options(subPath string, fn http.HandlerFunc) *Parent

func (*Parent) Patch Uses

func (pb *Parent) Patch(subPath string, fn http.HandlerFunc) *Parent

func (*Parent) Post Uses

func (pb *Parent) Post(subPath string, fn http.HandlerFunc) *Parent

func (*Parent) Put Uses

func (pb *Parent) Put(subPath string, fn http.HandlerFunc) *Parent

func (*Parent) Routes Uses

func (pb *Parent) Routes() []*Route

type Route Uses

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

func (*Route) GetHandler Uses

func (r *Route) GetHandler() http.HandlerFunc

func (*Route) GetMethod Uses

func (r *Route) GetMethod() string

func (*Route) GetPath Uses

func (r *Route) GetPath() string

Directories

PathSynopsis
middleware

Package routebuilder imports 4 packages (graph) and is imported by 1 packages. Updated 2019-06-05. Refresh now. Tools for package owners.