// GetEndpointHandler handles GET /endpoint request

GetEndpointHandler handles GET /endpoint request
// GetEndpointHandler handles GET / endpoint request
func GetEndpointHandler(c *routing.Context) error {
	serviceDiscovery := ServiceDiscovery(c)
	matchingURI := string(c.QueryArgs().Peek("uri"))
	identifier := string(c.QueryArgs().Peek("identifier"))
	serv, err := serviceDiscovery.FindByIdentifierOrMatchingUri(identifier, matchingURI)
	if err != nil {
		return ServiceNotFound(c)
	}
	group, getGroupErr := serv.GetGroup()
	if getGroupErr != nil {
		serv.GroupVisibility = serv.IsReachable
	} else {
		serv.GroupVisibility = group.IsReachable
	}
	serviceJSON, err := json.Marshal(serv)
	if err != nil {
		return ServiceNotFound(c)
	}
	return http.Ok(c, string(serviceJSON), ServiceDiscoveryServiceName())
}
func GetEndpointHandler ( c * routing . Context ) error { serviceDiscovery := ServiceDiscovery ( c ) matchingURI := string ( c . QueryArgs ( ) . Peek ( " " ) ) identifier := string ( c . QueryArgs ( ) . Peek ( " " ) ) serv , err := serviceDiscovery . FindByIdentifierOrMatchingUri ( identifier , matchingURI ) if err != nil { return ServiceNotFound ( c ) } group , getGroupErr := serv . GetGroup ( ) if getGroupErr != nil { serv . GroupVisibility = serv . IsReachable } else { serv . GroupVisibility = group . IsReachable } serviceJSON , err := json . Marshal ( serv ) if err != nil { return ServiceNotFound ( c ) } return http . Ok ( c , string ( serviceJSON ) , ServiceDiscoveryServiceName ( ) ) }
GetEndpointHandler handles GET /endpoint request
GetEndpointHandler handles GET / endpoint request
// create service discovery object with authenticated user
 // get query parameters
 // Search service by identifier or matchingURI. If error, throw not found response
 // get group visibility
