user-service

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

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 8 Imported by: 0

README

Budgetin - User Service

Overview

User Service is one of the microservices in Budgetin that responsible for user authentication and user authorization by managing the user roles and permissions.

This repository contains an application written in Go that utilizes Protocol Buffers and gRPC for communication. This README provides step-by-step instructions on how to install, compile, and run the application.

Installation and Setup

Before running the application, ensure you have Go installed on your machine. You can download and install it from the Go Official Website.

Once Go is installed, follow these steps:

  1. Clone the repository:

    git clone https://github.com/budgetin-app/user-service.git
    
  2. Change directory into the project folder:

    cd user-service
    
  3. Install Protocol Buffers Compiler (protoc):
    You need to have Protocol Buffers Compiler installed. You can download it from the Protocol Buffers GitHub releases page.

  4. Install protoc-gen-go:
    To generate Go files from .proto files, you need to install protoc-gen-go. You can do this using the following command:

    go install google.golang.org/protobuf/cmd/protoc-gen-go
    

Compilation and Running

  1. Compile the proto file
    The first step is to compile the .proto file using protoc. Navigate to the directory where the .proto file is located and execute the following command:

    protoc --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative:. ./app/proto/*.proto
    
  2. Build the generated wire injection file
    After compiling the .proto file, you need to generate the wire injection file. Run the following command:

    wire ./config
    
  3. Build and run the application through main.go file
    Finally, you can build and run the application using the main.go file. Execute the following commands:

    go build -o main.exe ; ./main
    

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app module

Jump to

Keyboard shortcuts

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