simple-go-starter

command module
v0.0.0-...-1cfd607 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 9 Imported by: 0

README

Build Status

simple-go-starter

Intro

Architecture

APIs

The Go swaggo plugin is used to generate API doc with annotations in the code.

The yaml of swagger api file is at swagger.yaml. Please review it with online swagger editor

Infrastructure

Makefile takes care of:

  • Run code linter with golangci-lint docker
  • Download dependencies using Go modules
  • Build binary into build/bin/
  • Build docker image using Dockerfile
  • Run unit test and generate test coverage report into coverage.out
  • Generate swagger API doc
  • Clean the compiled binary

The repo is integrated with Travis CI pipeline with travis.yml, which supports stages:

  • Lint make lint
  • Unit test make test
  • Build binary make build
  • Deploy the local built image on k8s cluster, check health of web service
    • Install k8s cluster on the fly using k8s Kind (running k8s cluster into container)
    • Build go-starter docker image locally
    • Load local built image into k8s cluster
    • Deploy go-starter app
    • Check the log of running pod
    • Deploy a k8s service for go-starter
    • Forward local traffic into the k8s service by kubectl port-forward
    • Check health of go-starter by curl

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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