@@ -333,7 +333,7 @@ func BuildRateLimitDescriptors(rule *traffic_manage.Rule) ([]*route.RateLimit_Ac
333333 Value : arg .GetValue ().GetValue ().GetValue (),
334334 })
335335 case apitraffic .MatchArgument_QUERY :
336- queryParameterValueMatch := BuildRateLimitActionQueryParameterValueMatch (descriptorKey , arg . Value )
336+ queryParameterValueMatch := BuildRateLimitActionQueryParameterValueMatch (descriptorKey , arg )
337337 actions = append (actions , & route.RateLimit_Action {
338338 ActionSpecifier : & route.RateLimit_Action_QueryParameterValueMatch_ {
339339 QueryParameterValueMatch : queryParameterValueMatch ,
@@ -425,22 +425,22 @@ func BuildRateLimitDescriptors(rule *traffic_manage.Rule) ([]*route.RateLimit_Ac
425425}
426426
427427func BuildRateLimitActionQueryParameterValueMatch (key string ,
428- value * apimodel. MatchString ) * route.RateLimit_Action_QueryParameterValueMatch {
428+ arg * apitraffic. MatchArgument ) * route.RateLimit_Action_QueryParameterValueMatch {
429429 queryParameterValueMatch := & route.RateLimit_Action_QueryParameterValueMatch {
430430 DescriptorKey : key ,
431- DescriptorValue : value .GetValue ().GetValue (),
431+ DescriptorValue : arg . GetValue () .GetValue ().GetValue (),
432432 ExpectMatch : wrapperspb .Bool (true ),
433433 QueryParameters : []* route.QueryParameterMatcher {},
434434 }
435- switch value .GetType () {
435+ switch arg . GetValue () .GetType () {
436436 case apimodel .MatchString_EXACT :
437437 queryParameterValueMatch .QueryParameters = []* route.QueryParameterMatcher {
438438 {
439- Name : key ,
439+ Name : arg . GetKey () ,
440440 QueryParameterMatchSpecifier : & route.QueryParameterMatcher_StringMatch {
441441 StringMatch : & v32.StringMatcher {
442442 MatchPattern : & v32.StringMatcher_Exact {
443- Exact : value .GetValue ().GetValue (),
443+ Exact : arg . GetValue () .GetValue ().GetValue (),
444444 },
445445 },
446446 },
@@ -449,13 +449,13 @@ func BuildRateLimitActionQueryParameterValueMatch(key string,
449449 case apimodel .MatchString_REGEX :
450450 queryParameterValueMatch .QueryParameters = []* route.QueryParameterMatcher {
451451 {
452- Name : key ,
452+ Name : arg . GetKey () ,
453453 QueryParameterMatchSpecifier : & route.QueryParameterMatcher_StringMatch {
454454 StringMatch : & v32.StringMatcher {
455455 MatchPattern : & v32.StringMatcher_SafeRegex {
456456 SafeRegex : & v32.RegexMatcher {
457457 EngineType : & v32.RegexMatcher_GoogleRe2 {},
458- Regex : value .GetValue ().GetValue (),
458+ Regex : arg . GetValue () .GetValue ().GetValue (),
459459 },
460460 },
461461 },
0 commit comments