Skip to content

Simply demo dependency injection using google wire, authorization flow using oauth2.0 , API using protobuf , and job queue using machinery

Notifications You must be signed in to change notification settings

evanhongo/happy-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This project simply demo

  • Dependency injection using google wire

  • Authorization flow using oauth2.0

  • API using protobuf

  • Job queue using machinery


Prerequisites

sudo apt install libvips
sudo apt install libvips-tools
  • redis


Folder Structure

repository

Responsible for any kind of data fetching or data posting activity. This can be interactions with databases or external API


service

Core business logic implementations are right here


other...

Please refer to golang development convention


Development Procedure

# Download dependencies in go.mod file
go mod download

# Upgrade dependency and all its dependencies to the latest version
go get -u <dependencies>

# Add any missing modules necessary to build  the current module's packages and dependencies, and remove unused modules
go mod tidy

# Install testing tools
go install github.com/golang/mock/mockgen
go install github.com/onsi/ginkgo/v2/ginkgo

# Generate files for testing purpose
ginkgo bootstrap
ginkgo generate

# Install swagger cli
go install github.com/swaggo/swag/cmd/swag

# Install protobuf cli and related tools
sudo apt update && apt install protobuf-compiler
go install google.golang.org/protobuf
go install github.com/twitchtv/twirp/protoc-gen-twirp

# Install wire cli
go install github.com/google/wire/cmd/wire

# Generate wire_gen.go file
go run github.com/google/wire/cmd/wire

Testing

About

Simply demo dependency injection using google wire, authorization flow using oauth2.0 , API using protobuf , and job queue using machinery

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published