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: 0

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