Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement presentation handlers #1

Open
aldy505 opened this issue Jan 1, 2023 · 0 comments
Open

Implement presentation handlers #1

aldy505 opened this issue Jan 1, 2023 · 0 comments
Labels

Comments

@aldy505
Copy link
Member

aldy505 commented Jan 1, 2023

This should be easy. For each handler, all you need to do is:

  1. Parse the request body (if any), to a schema that is already defined on the presentation/schema package.
  2. Convert the request schema into common business model
  3. Execute the business function
  4. Convert the returned business model into the response schema
  5. Send it

func (d *Dependency) EstimateHandler(w http.ResponseWriter, r *http.Request) {
// TODO!
}

func (d *Dependency) OrderHandler(w http.ResponseWriter, r *http.Request) {
// TODO!
}

func (d *Dependency) StatusHistoryHandler(w http.ResponseWriter, r *http.Request) {
// TODO
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant