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

[meta] New API & logic domains #640

Closed
fmartingr opened this issue Jul 9, 2023 · 2 comments
Closed

[meta] New API & logic domains #640

fmartingr opened this issue Jul 9, 2023 · 2 comments
Assignees
Milestone

Comments

@fmartingr
Copy link
Member

fmartingr commented Jul 9, 2023

Summary

This is the meta-task for the ongoing of refactoring the API into the Gin framework, that will split the logic into different files to ease maintenance this way:

http/
├── context/
│   └── ... # Contains custom context types for the handlers.
├── frontend/
│   └── ... # Contains the assets for the frontend.
├── middleware/
│   ├── auth.go # Contains the middleware for the authentication.
│   └── ... # Other middlewares
├── response/
│   └── ... # Contains the response types for the API.
├── routes/
│   ├── api/
│   │   ├── v1/
│   │   │   ├── bookmark.go # Contains the API routes for the bookmark endpoints.
│   │   │   └── ...
│   ├── bookmark.go # Contains the routes for the UI bookmark endpoints.
│   └── ... # Other UI endpoints
└── server.go # The main file of the server, contains the main function and the server struct.

While this issue is open/currently being worked on, the two APIs will coexist in the code, though only the legacy one will be exposed to end users until the refactored one is complete.

Related pull requests

Migration status

UI Routes

Category Method Endpoint Ready Tested Migrated
System GET /system/liveness
Bookmarks GET /bookmarks/:id/content
Bookmarks GET /bookmarks/:id/archive
Bookmarks GET /bookmarks/:id/thumb
Bookmarklet GET /bookmarklet
UI GET /*files*

API routes

Category Method Endpoint Ready Swagger Tested Migrated
Tags GET /api/v1/tags
Tags POST /api/v1/tags
Tags PUT/PATCH /api/v1/tags/:id
Tags DELETE /api/v1/tags/:id
Accounts GET /api/v1/accounts
Accounts POST /api/v1/accounts
Accounts PUT/PATCH /api/v1/accounts/:id
Accounts DELETE /api/v1/accounts/:id
Auth GET /api/v1/auth/account
Auth PUT /api/v1/auth/account
Auth POST /api/v1/auth/login
Auth POST /api/v1/auth/refresh
Bookmarks GET /api/v1/bookmarks
Bookmarks POST /api/v1/bookmarks
Bookmarks PUT /api/v1/bookmarks/cache
Bookmarks GET /api/v1/bookmarks/:id
Bookmarks PUT/PATCH /api/v1/bookmarks/:id
Bookmarks PUT /api/v1/bookmarks/:id/cache

Database

Category SQLite MySQL PSQL
CreateTags

Logic domains

  • Auth

Related issues

@stale
Copy link

stale bot commented Aug 21, 2023

This issue has been automatically marked as stale because it has not had any activity for quite some time.
It will be closed if no further activity occurs.
Thank you for your contributions.

@fmartingr
Copy link
Member Author

Closing in favor of the roadmap.

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

No branches or pull requests

1 participant