Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotMatch indicates that the given HTTP request path does not match to the pattern. ErrNotMatch = errors.New("not match to the path pattern") // ErrInvalidPattern indicates that the given definition of Pattern is not valid. ErrInvalidPattern = errors.New("invalid pattern") )
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
type Matcher interface { Match(path string) (map[string]string, error) IsStatic() bool Fields() []string Pattern() string }
Matcher .
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern is a template pattern of http request paths defined in https://github.com/googleapis/googleapis/blob/master/google/api/http.proto
func MustPattern ¶
MustPattern is a helper function which makes it easier to call NewPattern in variable initialization.
func NewPattern ¶
NewPattern returns a new Pattern from the given definition values. "ops" is a sequence of op codes. "pool" is a constant pool. "verb" is the verb part of the pattern. It is empty if the pattern does not have the part. "version" must be 1 for now. It returns an error if the given definition is invalid.
Click to show internal directories.
Click to hide internal directories.