PathMatchingSupport

com.improving.grpc_rest_gateway.runtime.handlers.PathMatchingSupport

Helper trait to make URI path matching. This is done to make testing easier.

Our aim is to match given incoming URL and match it to configured path in the protobuf.

There are two cases:

  1. When there is no path element, this is easy case we can have exact match, for example, /v1/messages.
  2. When there is path element, we can not have exact match just by comparing two strings, for example, if configured value is /v1/messages/{message_id}/users/{user_id} and runtime value is /v1/messages/1/users/1.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

protected def isSupportedCall(configuredMethodName: String, configuredPath: String, runtimeMethodName: String, runtimePath: String): Boolean
protected def mergeParameters(configuredPath: String, queryString: QueryStringDecoder): Map[String, Seq[String]]
protected def supportsCall(method: HttpMethod, uri: String): Boolean

Determine whether current HTTP method and uri are supported. Any given operation is supported if and only if google.api.http option is defined and gRPC function is unary (no streaming, either client or server).

Determine whether current HTTP method and uri are supported. Any given operation is supported if and only if google.api.http option is defined and gRPC function is unary (no streaming, either client or server).

Value parameters

method

HTTP method

uri

current URI

Attributes

Returns

true if supported, false otherwise

Abstract fields

protected val httpMethodsToUrisMap: Map[String, Seq[String]]