Git Product home page Git Product logo

innkeeper's People

Contributors

aryszka avatar c00ler avatar danpersa avatar eugenkiss avatar haldun avatar hjacobs avatar mo-gr avatar northfury avatar ruiaraujo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

innkeeper's Issues

Support eskip

We should be able to use eskip to list routes using curl.

Modify the methods for routes to be an array

Check how skipper defines the method matcher/predicate.

Figure out if it makes sense to do the following:

  • Right now, the method_matcher in the route can only accept one value.
  • It should be able to accept an array of values.

Default Filters

  • Create configuration for default filters in innkeeper.
  • Allow the user to append them, prepend them to the existing filters
  • Allow the users to skip the default filters
  • By default, prepend the filters

Fix the http client

The akka-http-client has a bug. Consider replacing the http-client, in case it's not possible to solve this issue.

See the related akka bug:
akka/akka#20004

Update paths

Should we keep them immutable like routes?

  • No

Consider a log for audit

  • We should have audit

Change the format of the payload:

{
    name: ...
    eskip: ... (optional - not needed for delete)
    timestamp: ...
    type: update | create | delete
}

Update the swagger spec.

Delete all routes

As a routes admin,
I'd like to be able to delete all of the routes (mark all routes as deleted)
So that I can start a new routes table

Incorrect rejection

This acceptance tests should pass.

val token = ADMIN_TOKEN

it("should give a bad request for duplicate name") {
          val routeName = "route_1"
          val response = postRoute(routeName, token, token.teamName + "-some-other-team")
          response.status should be(StatusCodes.OK)
          val entity = entityString(response)
          val route = entity.parseJson.convertTo[RouteOut]
          route.id should be(1)
          route.name should be(RouteName(routeName))
          route.createdBy should be(UserName(token.userName))
          routeFiltersShouldBeCorrect(route)
          routePredicatesShouldBeCorrect(route)

          val response1 = postRouteToSlashRoutes(routeName, route.pathId, token)
          response1.status should be(StatusCodes.BadRequest)
          entityString(response1).parseJson.convertTo[Error].errorType should be("DRN")
        }

Use Predicates instead of Matchers

  • Remove the matchers, port them to predicates
  • Create an abstraction to be able to validate predicates
  • Use that new abstraction to validate #the newly created predicates
  • Remove the matcher type (strict, regex)

New endpoint for skipper /current-routes

Skipper doesn't care about all of the routes, but only about the current ones. Create an endpoint where skipper can get the current state of the routes.

The /current-routes resource, has the route name as an id.

CallJson Unmarshalling

Make the callJson method do unmarshalling as well.
It could be httpClient.callJson[Seq[Team]](...)

Validate the path for the route

The path the route is created for should belong to the users team.

Also, as party of this task, owned by team needs to be removed from route. Routes belong to a path that is already assigned to a team.

Create a /deleted-routes resource

As a routes admin,
I'd like to be able to see and remove the oldly deleted routes from the database
So that I keep the routes database clean

Add disabled_at to a route

Skipper already supports it as a filter.
Make sure that we don't return the disabled routes to skipper.

Improve Configurations

In another large scala project, we decided have the config explicitly typed and containing functions. Something like

trait EnvConfig {
  def getOauthScopeRead: Set[String]
}

The idea is to avoid runtime failures just because someone has a typo in a key string. Also makes it very easy (and compile time checked) which configs are no longer used. Internally you still load them with config.getString(...) but the actual string is used just once in the whole code base inside of the private EnvConfig implementation. Every usage of that config value is via explicit, named function calls as outlined above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.