pathmethod

package
v0.64.12 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPathMethodInvalid = errors.New("pathmethod string invalid")

Functions

func ParsePathMethod

func ParsePathMethod(pathmethod string) (string, string, error)

func PathMethod

func PathMethod(htPath, htMethod string) string

PathMethod returns a path-method string which can be used as a unique identifier for an HTTP endpoint.

Types

type PathMethodSet

type PathMethodSet struct {
	PathMethods map[string]int
}

func NewPathMethodSet

func NewPathMethodSet() PathMethodSet

func (*PathMethodSet) Add

func (pms *PathMethodSet) Add(pathmethods ...string) error

Add adds pathmethod strings

func (*PathMethodSet) Count

func (pms *PathMethodSet) Count() int

func (*PathMethodSet) Exists

func (pms *PathMethodSet) Exists(htPath, htMethod string) bool

func (*PathMethodSet) StringExists

func (pms *PathMethodSet) StringExists(pathMethod string) bool

Jump to

Keyboard shortcuts

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