Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PopulateFieldFromPath ¶
PopulateFieldFromPath sets a value in a nested Protobuf structure.
func PopulateQueryParameters ¶
PopulateQueryParameters parses query parameters into "msg" using current query parser
Types ¶
type DefaultQueryParser ¶
type DefaultQueryParser struct{}
DefaultQueryParser is a QueryParameterParser which implements the default query parameters parsing behavior.
See https://github.com/grpc-ecosystem/grpc-gateway/issues/2632 for more context.
func (*DefaultQueryParser) Parse ¶
func (*DefaultQueryParser) Parse(msg proto.Message, values url.Values, filter *DoubleArray) error
Parse populates "values" into "msg". A value is ignored if its key starts with one of the elements in "filter".
type DoubleArray ¶
type DoubleArray struct {
// Encoding keeps an encoding from string to int
Encoding map[string]int
// Base is the base array of Double Array
Base []int
// Check is the check array of Double Array
Check []int
}
DoubleArray is a Double Array implementation of trie on sequences of strings.
func NewDoubleArray ¶
func NewDoubleArray(seqs [][]string) *DoubleArray
NewDoubleArray builds a DoubleArray from a set of sequences of strings.
func (*DoubleArray) HasCommonPrefix ¶
func (da *DoubleArray) HasCommonPrefix(seq []string) bool
HasCommonPrefix determines if any sequence in the DoubleArray is a prefix of the given sequence.
type QueryParameterParser ¶
type QueryParameterParser interface {
Parse(msg proto.Message, values url.Values, filter *DoubleArray) error
}
QueryParameterParser defines interface for all query parameter parsers