lg

module
v0.0.0-...-035dfa4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MIT

README

Go Report Card MIT License LinkedIn


Go net/rpc Authentication system

Go Microservices API with standard net/rpc, Docker containers and Kubernetes.
Explore the docs »

· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

I created this project as a way to learn more about Go's net/rpc, as well as learn more about Kubernetes and step up from docker-compose.

(back to top)

Built With

(back to top)

Getting Started

If you would like to test this project you can clone the repo and use the make to build and run. You will need Docker to build the docker images and minikube to run the kubernetes cluster.

Prerequisites

You will need to edit the env.sample files and rename them to .env. You will also need a PostgreSQL database to connect to.

Installation

  1. Clone the repo
    git clone https://github.com/rs401/lg.git
    
  2. Build the auth service and client API
    make build-api
    make build-auth
    
  3. To run locally you will need to:
    cd auth
    ./authsvc
    
    Open another terminal and:
    cd api
    ./authapi
    

(back to top)

Usage

Once the services are running and connected to your db you can send a request to http://localhost:9000/api/signup/ with a json object with a name, email and password in the body.

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

I welcome any code reviews, tips, suggestions, etc.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

LinkedIn

(back to top)

Directories

Path Synopsis
api
Package api provides HTTP endpoints
Package api provides HTTP endpoints
authclient
Package authclient provides a client to the auth service
Package authclient provides a client to the auth service
handlers
Package handlers provides handlerfuncs
Package handlers provides handlerfuncs
middlewares
Package middlewares provides middlewares Package middlewares provides middlewares
Package middlewares provides middlewares Package middlewares provides middlewares
routes
Package routes provides utility to setup routes
Package routes provides utility to setup routes
tokenutils
Package tokenutils provides utilities for JWTs
Package tokenutils provides utilities for JWTs
Package auth provides RPC methods to be called
Package auth provides RPC methods to be called
models
Package models provides data structures Package models provides data structures
Package models provides data structures Package models provides data structures
repository
Package repository provides methods to interact with the database
Package repository provides methods to interact with the database
service
Package service provides RPC methods to call repository actions
Package service provides RPC methods to call repository actions
Package db provides utilities to configure and connect to a database Package db provides utilities to configure and connect to a database
Package db provides utilities to configure and connect to a database Package db provides utilities to configure and connect to a database
Package validation provides methods for validating various inputs
Package validation provides methods for validating various inputs

Jump to

Keyboard shortcuts

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