todoAPI

command module
v0.0.1-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

todoAPI

CodeFactor Go report

Custom error descriptions
Code Meaning
0 invalid data
1 User with this email already exists
2 user don't exists
3 Wrong password
4 JWT token is invalid
5 Group don't exist
6 User doesn't own this group

Routes
Action Method Route
USER
Create user POST <host>/api/users
Get user list GET <host>/api/users
Get user info GET <host>/api/users/:id
Get user data GET <host>/api/users/:id/data
Update user data POST <host>/api/users/:id
Delete user DELETE <host>/api/users/:id
Login POST <host>/api/users/login
GROUP
Create group POST <host>/api/groups
Delete group DELETE <host>/api/groups/:id
TODO
Create todo POST <host>/api/groups/:group_id
Delete todo DELETE <host>/api/groups/:group_id/todos/:todo_id

Provided data-sets
Action Req. data
USER
Create user body {"email" string, "name" string}
Get user list header "X-admin-access"
Get user info none
Get user data JWT
Update user data JWT, body {"email" string, "password" base64, "name" string }
Delete user JWT
Login body {"email" string, "password" base64}
GROUP
Create group JWT, body {"title" string}
Delete group JWT
TODO
Create todo JWT, body {"title" string, "text" string, "deadline" date}
Delete todo JWT

🚨 Will be added during writing tests

Action Resp. data
USER
Create user
Get user list
Get user info
Get user data
Update user data
Delete user
Login
GROUP
Create group
Delete group
TODO
Create todo
Delete todo

Files
Action File State
USER
Create user /user_post 🚨 Need to be tested
Get user list /user_getList 🦺 Need to be tested
Get user info /user_getInfo 🦺 Need to be tested
Get user data /user_getData 🚨 Need to be tested
Update user data /user_upd 🦺 Need to be tested
Delete user /user_del 🦺 Need to be tested
Login /user_login 🚨 Need to be tested
GROUP
Create group /group_post 🚨 Need to be tested
Delete group /group_delete 🚨 Need to be tested
TODO
Create todo /todo_post 🚨 Need to be tested
Delete todo /todo_delete 🚨 Need to be tested

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址