argv

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const (
	RequestArgvKey         beContext.RequestKey = "RequestArgv"
	RequestRedirectKey     string               = "RequestRedirect"
	RequestArgvIgnoredKey  string               = "RequestArgvIgnored"
	RequestArgvConsumedKey string               = "RequestArgvConsumed"
)

Variables

View Source
var (
	RxPageRequestSplit = regexp.MustCompile(`/:`)
	RxPageRequestSafe  = regexp.MustCompile(`/:.*$`)
)
View Source
var (
	RxPageRequestArgvCase0 = regexp.MustCompile(`^(/[^:]+?)((?:/:[^/]+)+?)(/\d+/\d+/??)$`)
	RxPageRequestArgvCase1 = regexp.MustCompile(`^(/[^:]+?)(/\d+/\d+/??)$`)
	RxPageRequestArgvCase2 = regexp.MustCompile(`^(/[^:]+?)((?:/:[^/]+)+?)$`)
	RxPageRequestArgvCase3 = regexp.MustCompile(`^(/[^:]+?)$`)
)

Functions

This section is empty.

Types

type RequestArgv

type RequestArgv struct {
	Path       string
	Argv       [][]string
	NumPerPage int
	PageNumber int
	Language   language.Tag
	Request    *http.Request
}

func DecodeHttpRequest

func DecodeHttpRequest(r *http.Request) (reqArgv *RequestArgv)

func DecomposeHttpRequest

func DecomposeHttpRequest(r *http.Request) (reqArgv *RequestArgv)

func GetRequestArgv

func GetRequestArgv(r *http.Request) (reqArgv *RequestArgv)

func (*RequestArgv) Copy

func (ra *RequestArgv) Copy() (reqArg *RequestArgv)

func (*RequestArgv) MustConsume

func (ra *RequestArgv) MustConsume() (must bool)

func (*RequestArgv) Set

func (ra *RequestArgv) Set(r *http.Request) (req *http.Request)

func (*RequestArgv) String

func (ra *RequestArgv) String() (argvUrl string)

Jump to

Keyboard shortcuts

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