path

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAdapterName

func GetAdapterName(m any) string

Types

type Adapter

type Adapter[M any] struct {
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter[M any]() (*Adapter[M], error)

func (*Adapter[M]) Belongs

func (a *Adapter[M]) Belongs(am any) bool

func (*Adapter[M]) Decode

func (a *Adapter[M]) Decode(l *Location) (*M, bool)

func (*Adapter[M]) DecodeAny

func (a *Adapter[M]) DecodeAny(l *Location) (any, bool)

func (*Adapter[M]) Encode

func (a *Adapter[M]) Encode(m *M) (*Location, error)

func (*Adapter[M]) EncodeAny

func (a *Adapter[M]) EncodeAny(am any) (*Location, error)

func (*Adapter[M]) GetName

func (a *Adapter[M]) GetName() string

func (*Adapter[M]) GetRef

func (a *Adapter[M]) GetRef(ma any) (*M, bool)

type AnyAdapter

type AnyAdapter interface {
	DecodeAny(*Location) (any, bool)
	EncodeAny(any) (*Location, error)
	Belongs(any) bool
	GetName() string
}

type Capture

type Capture int
const (
	NoCapture Capture = iota
	CapturePart
	CaptureToEnd
)

type Location

type Location struct {
	Path  string
	Query url.Values
}

func NewRequestLocation

func NewRequestLocation(r *http.Request) *Location

func (Location) String

func (l Location) String() string

Jump to

Keyboard shortcuts

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