Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(m protoreflect.MethodDescriptor) (*annotations.HttpRule, bool)
Types ¶
type FieldPath ¶
type FieldPath []string
FieldPath describes the path for a field from a message. Individual segments are in snake case (same as in protobuf file).
type Rule ¶
type Segment ¶
type Segment struct { Kind SegmentKind Literal string Variable VariableSegment }
Segment represents a single segment of a Template.
type SegmentKind ¶
type SegmentKind int
const ( SegmentKindLiteral SegmentKind = iota SegmentKindMatchSingle SegmentKindMatchMultiple SegmentKindVariable )
type Template ¶
Template represents a http path template.
Example: `/v1/{name=books/*}:publish`.
func ParseTemplate ¶
type VariableSegment ¶
VariableSegment represents a variable segment.
Click to show internal directories.
Click to hide internal directories.