refactor: seperate concerns via handler, service, storage #2

Open
opened 2026-03-21 21:23:13 +01:00 by lucas · 0 comments
Owner

ideally, all business logic should be in a service (file chat.go) and use purely our defined go structs.

a handler would be responsible from translating incoming HTTP API request containing json into the correct Go function calls + structs.

the storage part would be responsible for translating our Go structs + functions into SQL queries.

ideally, all business logic should be in a service (file chat.go) and use purely our defined go structs. a handler would be responsible from translating incoming HTTP API request containing json into the correct Go function calls + structs. the storage part would be responsible for translating our Go structs + functions into SQL queries.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lucas/grugchat#2
No description provided.