parameters

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	// Number is the page number that starts with 1
	Number,

	Size uint32
}

Page contains all the pagination parameters

func NormalizePagination

func NormalizePagination(pageNumber, pageSize string) Page

NormalizePagination returns a struct with normalized pagination parameters

type Resolver

type Resolver interface {
	// Resolve takes the HTTP request and resolves a parameters value by the given name
	Resolve(*http.Request, string) string
}

Resolver is able to resolve a parameter value by name

func NewChiResolver

func NewChiResolver() Resolver

NewChiResolver returns a parameter resolves that uses chi-based resolver

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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