Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Implement CRUD operations for User Service #10

Merged
merged 9 commits into from
Nov 23, 2021
Merged

Conversation

OlegAndrus12
Copy link
Contributor

@OlegAndrus12 OlegAndrus12 commented Nov 11, 2021

Description

These changes affect user service only and include CRUD interface for User Service. It operates with the Firebase Real Time database (No SQL database) via client library.
Plus, I have wrapped user service with docker in order to make a deployment more smoth and painless.

Publisher and subscriber python files the way we communicate with Google Pub/Sub in python.

Database connector provides an CRUD interface for user profile information.
Dockerfile simply copy all scripts in the one directory and run main.py as an entry point for the whole user service application. There are just a few lines of code for now. More will be added later.

Issues

LFND-44 | Implement CRUD operations for User Service

How Has This Been Tested?

In order to test this changes you need to add json credentials to the user service root directory (you can download them from google cloud and firebase).

Checklist:

  • Pull request name matches ticket name
  • Pull request description is not empty
  • My code responds to the latest guidelines (are u satisfied with what you have done?)

Copy link
Collaborator

@nikilark nikilark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for me, it looks more like POC for using firebase in python, than sth about user_service
What these models have in common with our (real) application? Where do we will store avatars, profile description, etc? Password user_service will get already hashed, I didn't see you handled this

services/user_service/database_connector.py Outdated Show resolved Hide resolved
services/user_service/database_connector.py Outdated Show resolved Hide resolved
services/user_service/database_connector.py Outdated Show resolved Hide resolved
services/user_service/publisher.py Outdated Show resolved Hide resolved
services/user_service/subscriber.py Outdated Show resolved Hide resolved
services/user_service/database_connector.py Outdated Show resolved Hide resolved
services/user_service/data.json Outdated Show resolved Hide resolved
services/user_service/Dockerfile Show resolved Hide resolved
@OlegAndrus12
Copy link
Contributor Author

@ZhavoronkovN hold on. Let me push new commits first)

@OlegAndrus12
Copy link
Contributor Author

Note: for the tests I have created a separate database in Firebase on my personal account.

Copy link
Collaborator

@nikilark nikilark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better, well done!

Copy link
Collaborator

@nikilark nikilark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still ok

@OlegAndrus12 OlegAndrus12 merged commit 14ea85b into main Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants