Monorepo for Tangled tangled.org

draft: appview: service layer #800

open opened by boltless.me targeting master from sl/uvpzuszrulvq

Obviously file naming of appview/web/handler/*.go files are directly against to go convention. Though I think flattening all handler files can significantly reduce the effort involved in file naming and structuring. We are already grouping core services by domains, and doing same for web handers is just over-complicating.

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3m5jyyj76xa22
+6 -7
Interdiff #0 #1
appview/service/issue/context.go

This file has not been changed.

appview/service/issue/issue.go

This file has not been changed.

appview/service/issue/state.go

This file has not been changed.

appview/service/owner/context.go

This file has not been changed.

appview/service/repo/context.go

This file has not been changed.

appview/service/repo/repo.go

This file has not been changed.

appview/state/router.go

This file has not been changed.

appview/web/handler/issues.go

This file has not been changed.

appview/web/handler/issues_issue.go

This file has not been changed.

appview/web/handler/issues_issue_close.go

This file has not been changed.

appview/web/handler/issues_issue_edit.go

This file has not been changed.

appview/web/handler/issues_issue_opengraph.go

This file has not been changed.

appview/web/handler/issues_issue_reopen.go

This file has not been changed.

appview/web/handler/issues_new.go

This file has not been changed.

appview/web/handler/repos_new.go

This file has not been changed.

appview/web/handler/repos_repo.go

This file has not been changed.

appview/web/handler/repos_repo_opengraph.go

This file has not been changed.

appview/web/middleware/auth.go

This file has not been changed.

appview/web/middleware/log.go

This file has not been changed.

appview/web/middleware/middleware.go

This file has not been changed.

appview/web/middleware/paginate.go

This file has not been changed.

appview/web/middleware/resolve.go

This file has not been changed.

+6 -7
appview/web/routes.go
··· 17 17 "tangled.org/core/idresolver" 18 18 ) 19 19 20 - // obviously this is directly against to the go convention, though I think 21 - // flattening all handler files can significantly reduce the effort involved in 22 - // file naming and grouping. We are already grouping services by domains, and 23 - // doing same to web handlers is just over complicating imo 24 - 25 20 // Rules 26 - // - use single function for each endpoints (unless it doesn't make sense) 27 - // - pass dependencies to each handlers, don't share dependencies 21 + // - Use single function for each endpoints (unless it doesn't make sense.) 22 + // - Name handler files following the related path (ancestor paths can be 23 + // trimmed.) 24 + // - Uass dependencies to each handlers, don't create structs with shared 25 + // dependencies unless it serves some domain-specific roles like 26 + // service/issue. Same rule goes to middlewares. 28 27 29 28 func UserRouter( 30 29 // NOTE: put base dependencies (db, idResolver, oauth etc)

History

14 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
appview/{service,web}: service layer
1/3 failed, 2/3 success
expand
merge conflicts detected
expand
  • appview/pages/templates/user/login.html:33
  • appview/state/profile.go:817
  • appview/pages/templates/user/login.html:31
  • appview/pages/templates/user/login.html:93
  • appview/repo/artifact.go:251
  • appview/state/profile.go:528
expand 0 comments
1 commit
expand
appview/{service,web}: service layer
1/3 failed, 2/3 success
expand
expand 0 comments
1 commit
expand
appview/{service,web}: service layer
3/3 failed
expand
expand 0 comments
1 commit
expand
appview/{service,web}: service layer
3/3 success
expand
expand 0 comments
1 commit
expand
appview/{service,web}: service layer
2/3 failed, 1/3 success
expand
expand 0 comments
1 commit
expand
appview/{service,web}: service layer
3/3 success
expand
expand 0 comments
1 commit
expand
appview/{service,web}: service layer
1/3 failed, 2/3 timeout
expand
expand 0 comments
1 commit
expand
draft: appview/service: service layer
3/3 success
expand
expand 0 comments
1 commit
expand
draft: appview/service: service layer
1/3 failed, 1/3 timeout, 1/3 success
expand
expand 0 comments
1 commit
expand
draft: appview/service: service layer
3/3 success
expand
expand 0 comments
1 commit
expand
draft: appview/service: service layer
3/3 success
expand
expand 0 comments
1 commit
expand
draft: appview/service: service layer
3/3 success
expand
expand 0 comments
1 commit
expand
draft: appview: service layer
3/3 failed
expand
expand 0 comments
1 commit
expand
draft: appview: service layer
3/3 failed
expand
expand 0 comments