skeleton

command module
v0.0.0-...-0c43097 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

This repository hosts a working demo of github.com/DoNewsCode/core.

Highlight

  • Shows how to use package core to bootstrap a service.
  • A go kit service with mysql at /app/user.
  • A gin service with redis at /app/book.
  • CLI commands to orchestrate services.
  • swagger doc at /docs
  • prometheus metrics at /metrics
  • pprof info at /debug
  • healthcheck at /live and /ready

Prerequisite

  • mysql listening at localhost:3306, with a database called app created.
  • redis listening at localhost:6379

Command

Export a sample configuration file:

go run main.go config init

Run database migration:

go run main.go database migrate

Run database migration rollback:

go run main.go database migrate --rollback

Run database seeding:

go run main.go database seed

Seed redis (custom command):

go run main.go seedRedis

Start the server:

go run main.go serve

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
user/gen/client/grpc
Package grpc provides a gRPC client for the User service.
Package grpc provides a gRPC client for the User service.
user/gen/client/http
Package http provides an HTTP client for the User service.
Package http provides an HTTP client for the User service.
cmd
internal

Jump to

Keyboard shortcuts

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