coralproject / pillar

Deprecated: Service layer for the Coral ecosystem
Other
4 stars 1 forks source link

Refactoring - Introduce a new MW, AppContext to work with handler and service layer #62

Closed samshub closed 8 years ago

samshub commented 8 years ago

Encapsulate everything that is needed to pass information from handler to service layer. The first one may look like this, but can be expanded to fit our needs.

type AppContext struct {
    DB      *db.MongoDB
    Input   interface{}
}

Also add a new handler that can take care of the plumbing/common code in all handlers.

samshub commented 8 years ago

Closed!