router

package module
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: MPL-2.0 Imports: 12 Imported by: 2

README

router

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	GetRoutes() []Route
}

type Error

type Error struct {
	StatusCode int
	Message    string
	Err        error
}

type OptionalVars

type OptionalVars struct {
	Value map[string][]string
}

type Result

type Result struct {
	StatusCode int
	Model      interface{}
}

type Route

type Route struct {
	Path            string
	Method          string
	HandleFunc      interface{}
	UseVars         bool
	UseOptionalVars bool
	UseRequestModel bool
	RequestModel    interface{}
}

type Router

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

func (*Router) AddController

func (router *Router) AddController(controller Controller)

func (*Router) AddRoute

func (router *Router) AddRoute(route Route)

func (*Router) Init

func (router *Router) Init(manager *dependencies.Manager)

func (*Router) ListenAndServe

func (router *Router) ListenAndServe(address string)

type Vars

type Vars struct {
	Value map[string]string
}

Jump to

Keyboard shortcuts

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