GithubHelp home page GithubHelp logo

goecom's Introduction

创建 mall 服务 mkdir goecom cd goecom go mod init goecom

lib model: goctl model mysql ddl -src merchant.sql -dir . -c -style goZero goctl model mysql ddl -src merchant_user.sql -dir . -c -style goZero goctl model mysql ddl -src store.sql -dir . -c -style goZero goctl model mysql ddl -src languages.sql -dir . -c -style goZero

product model: goctl model mysql ddl -src product_brand.sql -dir . -c -style goZero

api: goctl api go -api product.api -dir . -style goZero goctl api go -api lib.api -dir . -style goZero

#install swagger brew tap go-swagger/go-swagger brew install go-swagger #intsll goctl-swagger https://github.com/zeromicro/goctl-swagger goctl api plugin -plugin goctl-swagger="swagger -filename lib.json" -api lib.api -dir . -style goZero #生成 Swagger json 文件 goctl api plugin -plugin goctl-swagger="swagger -filename lib.json -host 127.0.0.1:6001" -api lib.api -dir . #生成 Swagger json 文件 指定 host 生成 rpc 代码: goctl rpc protoc lib.proto --go_out=./types --go-grpc_out=./types --zrpc_out=. -style goZero

各位好,问一下: 现在我们搭的项目, 写好 API 后用下面命令生成 API Json 文件; goctl api plugin -plugin goctl-swagger="swagger -filename lib.json" -api lib.api -dir . -style goZero 后台管理用的是 Ant pro design, 把上面生成的 Json 文件放到 config 文件夹用 npm run openapi 生成 API 调用的 JS 代码; 现在遇到的问题是, 在没有 JWT Token 时候是可以的, 加入 JWT 后

各位好,问一下: goctl api plugin -plugin goctl-swagger="swagger -filename lib.json" -api lib.api -dir . -style goZero 这个生命令有没有方法把 JWT token 的 header 参数生成进去

goecom's People

Watchers

Denny liu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.