user_authentication

command module
v0.0.0-...-5d940fb Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 4 Imported by: ? 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

user_authentication

Installation

Database & Migrations

There's a docker compose to create a db and migrate all the migrations, just do the following and you'll be good to go.

docker-compose up -d

Running The Project

Run the following command in the root folder of the application.

go get

And then:

go run main.go

And to run the tests all together:

go test ./...

Docs

List Users

List Users with filters

The pagination starts at 0

GET localhost:8080/user/?page=0&cancelled=false

List All Users

GET localhost:8080/user/

Create Users

The signup method and the create method do pretty much the same thing because there is no validation on who gives what data so... :D

Create

POST localhost:8080/user/ Request body should be like:

{
    "first_name": "name",
    "last_name": "last name",
    "national_id": "some string and numbers"
}
Signup

POST localhost:8080/user/signup Request body should be like:

{
    "first_name": "name",
    "last_name": "last name",
    "national_id": "some string and numbers"
}

Cancel Signup

POST localhost:8080/user/signup/cancel/{{{some-user-uuid}}}

Delete User

DELETE localhost:8080/user/{{{some-user-uuid}}}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
handler

Jump to

Keyboard shortcuts

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