Socket
Book a DemoInstallSign in
Socket

github.com/it-sgn/sgn-layout

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/it-sgn/sgn-layout

Source
Go
Version
v0.0.0-20250409081247-05fa90043390
Version published
Created
Source

sgn-layout

Convenient and quick service startup, unified project template, three-key generation of microservices

1. Create a project-specific template

Assume the project directory is projectName

kratos new $(projectName) -r git@github.com:itsgn/sgn-layout.git

2. Initialize the project package

The value of projectName here needs to be consistent with the first step

make initProject PROJECT=$(projectName)

3.Initialize project services

make initNewService ServiceUpperName=Store ServiceLowerName=store

Summary

The above operation will generate a directory named projectName, containing a crud service named StoreService.

  • db: postgresql, orm: gorm
  • cache:redis
  • trace:jaeger
  • registry && discovery: etcd
  • log: kratos/v2/log json format
  • validate: protoc-gen-validate

pkg/utils: Commonly used function packages

Other notes

  • If the environment is set to dev, it is a development environment. You can set rules based on this variable, such as debug mode, print sql

  • Integer values ​​are all int64. When converting proto to json, the int64 type will be converted to string type due to precision issues

  • The interface document is in openapi.yaml

  • The local development and docker deployment files are configs/config-dev.yaml, which can be changed in Dockerfile

FAQs

Package last updated on 09 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts