It's an authentication application written in Go.
Golang - Basic Login/Register services implemented using
- gRPC
- Database (MySQL)
- Kafka
- Redis
CREATE TABLE
authentication.user_credentials(idINT unsigned NOT NULL AUTO_INCREMENT,usernameVARCHAR(30) NOT NULL,passwordVARCHAR(100) NOT NULL,phoneVARCHAR(13) NOT NULL,created_attimestamp NOT NULL DEFAULT current_timestamp,updated_attimestamp NOT NULL DEFAULT current_timestamp,deleted_atvarchar(45) NULL default '0000-00-00 00:00:00', PRIMARY KEY (username, id));
Set the go path by running
export PATH=$PATH:$(dirname $(go list -f '{{.Target}}' .))
After installing all the dependencies
Compile protos by following commands :
protoc -I=proto --go_out=plugins=grpc:proto proto/auth-messages.proto
protoc -I=proto --go_out=plugins=grpc:proto proto/auth-services.proto
Run the Kafka server and Redis servers, and set the required properties in application.yaml file
go run AuthenticationApp.go
It will start the grpc server at the address mentioned in your application.yaml file
To run the Unit tests
go test server/GrpcServer_test.go -v (TestFunction_name)