routes

package
v0.0.0-...-925651e Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(lucid.Context) *errors.AppError

type Method

type Method []string

type Middlewares

type Middlewares []string

type Queries

type Queries []string

type Resources

type Resources map[string]Handler

type Routing

type Routing struct {
	Name                 string
	Path                 string
	Prefix               bool
	Method               []string
	Queries              Queries
	Handler              Handler
	Resources            map[string]Handler
	Middlewares          []string
	Static               string
	WithGlobalMiddleware interface{}
}

func (Routing) LoadTester

func (r Routing) LoadTester(res *httptest.ResponseRecorder, req *http.Request) *RoutingTest

type RoutingTest

type RoutingTest struct {
	ResponseRecorder *httptest.ResponseRecorder
	Request          *http.Request
	Err              error
	Testing          *testing.T
	Content          string
	Routing          Routing
}

func (RoutingTest) AssertResponseContains

func (rt RoutingTest) AssertResponseContains(expectation string)

func (RoutingTest) AssertStatus

func (rt RoutingTest) AssertStatus(expectation uint)

func (*RoutingTest) AssertUsing

func (rt *RoutingTest) AssertUsing(t *testing.T)

func (*RoutingTest) CallHandler

func (rt *RoutingTest) CallHandler()

Jump to

Keyboard shortcuts

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