auth

module
v0.0.0-...-a1d8bd3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0

README

Auth Service

Build Status

Overview

This repository contains the implementation of an authentication service using Go. The service provides functionalities for user registration and JWT token generation.

Project Structure

  • proto/v1/auth/auth.proto: Protocol Buffers definitions for the authentication service.
  • internal/service: Implementation of the authentication services.
  • internal/model: Data models used in the service.
  • pkg/encrypt: Encryption utilities.
  • pkg/server: HTTP / gRPC server implementations.
  • ddl: Database schema.
  • config: Configuration.
  • go.mod: Go module dependencies.

Getting Started

Prerequisites
  • Go 1.22+
  • MySQL 5.7+
  • buf for proto generation
Installation
  1. Clone the repository:

    git clone https://github.com/d3code/auth.git
    cd auth
    
  2. Install Go dependencies:

    go mod tidy
    
  3. Install buf:

    brew tap bufbuild/buf
    brew install buf
    
  4. Compile Protocol Buffers:

    make proto
    
  5. Setup database:

    ./database.sh
    
Running the Service

To run the authentication service, use the following command:

go run ./cmd/auth

Directories

Path Synopsis
cmd
auth command
internal
db
pkg

Jump to

Keyboard shortcuts

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