endpointMatchDesiredInterface

@description determine if the endpoint interface matches the desired interface
@param {object} endpoint
@returns {Boolean}
497547
function endpointMatchDesiredInterface(endpoint) {
    var interfaceToUse = 'public';
    if (options.useInternal === true) {
      interfaceToUse = 'internal';
    } else if (options.useAdmin === true) {
      interfaceToUse = 'admin';
    }
    return endpoint['interface'] === interfaceToUse;
  }
1342558
final boolean match(final Subject subject,
                        final SICoreConnection coreConnection) {

        boolean subjectsMatch = (_subject == null) ? (subject == null)
                        : (_subject.equals(subject));
        boolean coreConnectionsMatch = (coreConnection == null)
                                       || coreConnection.isEquivalentTo(_coreConnection);

        return subjectsMatch && coreConnectionsMatch && isValid();

    }
24346
function verifyEndpoint(request, respond)
{
  var challenge;

  if (typeof request.query == 'string')
  {
    request.query = qs.parse(request.query);
  }

  if (typeof request.query == 'object'
    && ((request.query['hub.verify_token'] === this.credentials.secret)
        // for hapi@10 and restify/express with queryParser check for `hub` object
    || (typeof request.query.hub == 'object' && request.query.hub['verify_token'] === this.credentials.secret)
    )
  )
  {
    challenge = request.query['hub.challenge'] || (request.query.hub ? request.query.hub.challenge : null);

    this.logger.debug({message: 'Successfully verified', challenge: challenge});
    respond(challenge);
    return;
  }

  this.logger.error({message: 'Unable to verify endpoint', query: request.query});
  respond(400, 'Error, wrong validation token');
}
488201
private void findMatchingValues(NavigableMap<Endpoint, Integer> map, Endpoint endpoint, List<UUID> result) {
        // Mark this endpoint as a marker, because it is used to do a tailMap traversal to query matching edges
        endpoint.setMarker();
        
        // Find the first key 
        Endpoint floorKey = map.floorKey(endpoint);
        
        Map<Endpoint, Integer> view;
        if (floorKey == null) {
            // This means that the element being searched is the minimum
            view = map;
        } else {
            view = map.tailMap(floorKey);
        }
        
        boolean isFirst = true;
        for (Map.Entry<Endpoint, Integer> entry : view.entrySet()) {
            Endpoint key = entry.getKey();

            if (endpoint.isMatch(key)) {
                // Matching entry, must be added to result
                result.add(key.getEdgeId());
            } else {
                // Done with the search -- the tree map is sorted
                
                if (isFirst) {
                    // continue
                } else {
                    break;
                }
            }
            
            isFirst = false;
        }
    }
871069
public boolean matches(String target, int start, int end) {
		return this.matches(target, start, end, (Match) null);
	}
641428
def is_valid_endpoint_host(interfaces, endpoint):
        
        result = urlparse(endpoint)
        hostname = result.hostname
        if hostname is None:
            return False

        for interface in interfaces:
            if interface == hostname:
                return False

        return True
777094
function validateEndpointData(
  data,
  { prettyErrorMessage = 'invalid response data', includeKeys = false } = {}
) {
  return validate(
    {
      ErrorClass: InvalidResponse,
      prettyErrorMessage,
      includeKeys,
      traceErrorMessage: 'Response did not match schema',
      traceSuccessMessage: 'Response after validation',
      allowAndStripUnknownKeys: false,
    },
    data,
    endpointSchema
  )
}
1293102
def parse_endpoint(endpoint, identifier_type=None):
        
        # compute the operation
        parts = endpoint.split(".")
        operation = Operation.from_name(parts[1])

        # extract its parts
        matcher = match(operation.endpoint_pattern, endpoint)
        if not matcher:
            raise InternalServerError("Malformed operation endpoint: {}".format(endpoint))
        kwargs = matcher.groupdict()
        del kwargs["operation"]
        if identifier_type is not None:
            kwargs["identifier_type"] = identifier_type
        return operation, Namespace(**kwargs)
748012
def owns_endpoint(self, endpoint):
        

        if self.blueprint:
            if endpoint.startswith(self.blueprint.name):
                endpoint = endpoint.split(self.blueprint.name + '.', 1)[-1]
            else:
                return False
        return endpoint in self.endpoints
444776
public static Endpoint merge(Endpoint defaults, Endpoint override) {

        if (defaults == null) {
            defaults = new Endpoint();
        }

        if (override == null) {
            override = new Endpoint();
        }

        final Endpoint merged = new Endpoint();

        merged.setCredentialScope(override.getCredentialScope() != null
                ? override.getCredentialScope()
                : defaults.getCredentialScope());

        merged.setHostName(override.getHostName() != null
                ? override.getHostName()
                : defaults.getHostName());

        merged.setSslCommonName(override.getSslCommonName() != null
                ? override.getSslCommonName()
                : defaults.getSslCommonName());

        merged.setProtocols(override.getProtocols() != null
                ? override.getProtocols()
                : defaults.getProtocols());

        merged.setSignatureVersions(override.getSignatureVersions() != null
                ? override.getSignatureVersions()
                : defaults.getSignatureVersions()
        );

        return merged;

    }
1106745
private static boolean isCompatible(ArgumentMatcher<?> argumentMatcher, Object argument) {
        if (argument == null)
            return true;

        Class<?> expectedArgumentType = getArgumentType(argumentMatcher);

        return expectedArgumentType.isInstance(argument);
    }
156676
function baseMatches(source) {
  var matchData = _getMatchData(source);
  if (matchData.length == 1 && matchData[0][2]) {
    return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
  }
  return function(object) {
    return object === source || _baseIsMatch(object, source, matchData);
  };
}
1195222
boolean isMatch(Class<?> beanType, Object id) {

    return beanType.equals(this.beanType) && idMatch(id);
  }
1210450
private Retrofit.Builder setEndpoint(Retrofit.Builder retrofitBuilder, String endpoint) {
    if (endpoint != null) {
      return retrofitBuilder.baseUrl(endpoint);
    }
    return retrofitBuilder;
  }
861577
function _gpfPathMatchApply (pathMatcher) {
    /*jshint validthis:true*/
    if (pathMatcher.match(this.parts)) {
        this.result = !pathMatcher.negative;
        return false; // Stop the main loop
    }
    return _gpfPathMatchAfterApplyNonMatching.call(this, pathMatcher);
}
557663
def _is_valid_endpoint(endpoint):
    """"""
    return any([is_number(endpoint),
                isinstance(endpoint, Timestamp),
                isinstance(endpoint, Timedelta),
                endpoint is None])
1151153
private void handleEndpointMatch(OngoingRequest request, RuleMatch<Endpoint> match) {
    final Endpoint endpoint = match.getRule().getTarget();
    final Map<String, String> parsedPathArguments = match.parsedPathArguments();
    final Client requestScopedClient = client.wrapRequest(request.request());
    final RequestContext requestContext =
        RequestContexts.create(request.request(),
                               requestScopedClient,
                               parsedPathArguments,
                               request.arrivalTimeNanos(),
                               request.metadata());

    erf.create(request, requestContext, endpoint)
        .run();
  }