ginusers

command module
v0.0.0-...-d308771 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: MIT Imports: 7 Imported by: 0

README

A example Microservices in Go language

Supported features

  • Create user

  • Modify user

  • Delete user

  • List user and all users

  • Authentication based on JWT tokens

  • Authorization based on JWT claims and Casbin declartive authorization

  • SSL enabled endpoint

  • Uses Gin gonic web framework https://github.com/gin-gonic/gin

  • Uses config file to load server variables

  • User password encrypted in the database tables using bcrypt

For ssl

keytool -export -keystore keystore.p12 -alias interns2019 -file interns2019.cer openssl x509 -inform der -in interns2019.cer -out interns2019.pem

postgresql

systemctl status postgresql - check status of postgres systemctl status postgresql - start postgres

$ sudo -u postgres psql

`User table

Column | Type | Collation | Nullable | Default
------------+--------------------------+-----------+----------+----------------------------------- id | integer | | not null | nextval('users_id_seq'::regclass) uid | uuid | | | username | text | | | password | text | | | message | text | | | created_at | timestamp with time zone | | | updated_at | timestamp with time zone | | |

Indexes: "users_pkey" PRIMARY KEY, btree (id)

select * from users

id | uid | username | password | message | created_at | updated_at

INSERT INTO users (username, password) VALUES ('admin', '12345'), ('user1', '12345');

delete from users where id = 2`

==========================

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
users
db

Jump to

Keyboard shortcuts

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