Skip to content

Commit

Permalink
chore(*): save code after video course (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
baiyutang authored Jul 1, 2024
1 parent 634b7b8 commit 2486f02
Show file tree
Hide file tree
Showing 35 changed files with 2,907 additions and 38 deletions.
4 changes: 4 additions & 0 deletions gomall/tutorial/ch16/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
app/*/log
app/*/tmp
app/*/.env
go.work.sum
38 changes: 37 additions & 1 deletion gomall/tutorial/ch16/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,40 @@ gen-order:
.PHONY: gen-email
gen-email:
@cd rpc_gen && cwgo client --type RPC --service email --module ${ROOT_MOD}/rpc_gen -I ../idl --idl ../idl/email.proto
@cd app/email && cwgo server --type RPC --service email --module ${ROOT_MOD}/app/email --pass "-use ${ROOT_MOD}/rpc_gen/kitex_gen" -I ../../idl --idl ../../idl/email.proto
@cd app/email && cwgo server --type RPC --service email --module ${ROOT_MOD}/app/email --pass "-use ${ROOT_MOD}/rpc_gen/kitex_gen" -I ../../idl --idl ../../idl/email.proto

.PHONY: tidy-all
tidy-all:
cd app/cart && go mod tidy
cd app/checkout && go mod tidy
cd app/email && go mod tidy
cd app/frontend && go mod tidy
cd app/order && go mod tidy
cd app/payment && go mod tidy
cd app/product && go mod tidy
cd app/user && go mod tidy
cd common && go mod tidy

.PHONY: build-frontend
build-frontend:
docker build -f ./deploy/Dockerfile.frontend -t frontend:${v} .

.PHONY: build-svc
build-svc:
docker build -f ./deploy/Dockerfile.svc -t ${svc}:${v} --build-arg SVC=${svc} .

.PHONY: build-all
build-all:
docker build -f ./deploy/Dockerfile.frontend -t frontend:${v} .
docker build -f ./deploy/Dockerfile.svc -t cart:${v} --build-arg SVC=cart .
docker build -f ./deploy/Dockerfile.svc -t checkout:${v} --build-arg SVC=checkout .
docker build -f ./deploy/Dockerfile.svc -t email:${v} --build-arg SVC=email .
docker build -f ./deploy/Dockerfile.svc -t order:${v} --build-arg SVC=order .
docker build -f ./deploy/Dockerfile.svc -t payment:${v} --build-arg SVC=payment .
docker build -f ./deploy/Dockerfile.svc -t product:${v} --build-arg SVC=product .
docker build -f ./deploy/Dockerfile.svc -t user:${v} --build-arg SVC=user .

.PHONY: kind-load-image
kind-load-image:
kind load docker-image --name gomall-dev \
frontend:${v} cart:${v} checkout:${v} email:${v} order:${v} payment:${v} product:${v} user:${v}
36 changes: 35 additions & 1 deletion gomall/tutorial/ch16/app/cart/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ replace github.com/apache/thrift => github.com/apache/thrift v0.13.0

replace github.com/cloudwego/biz-demo/gomall/rpc_gen => ../../rpc_gen

replace github.com/cloudwego/biz-demo/gomall/common => ../../common

require (
github.com/cloudwego/biz-demo/gomall/common v0.0.0-00010101000000-000000000000
github.com/cloudwego/biz-demo/gomall/rpc_gen v0.0.0-00010101000000-000000000000
github.com/cloudwego/kitex v0.8.0
github.com/joho/godotenv v1.5.1
Expand All @@ -22,8 +25,10 @@ require (
require (
github.com/apache/thrift v0.19.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/gopkg v0.0.0-20231219111115-a5eedbe96960 // indirect
github.com/bytedance/sonic v1.10.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.1 // indirect
Expand All @@ -32,17 +37,20 @@ require (
github.com/cloudwego/dynamicgo v0.1.6 // indirect
github.com/cloudwego/fastpb v0.0.4 // indirect
github.com/cloudwego/frugal v0.1.12 // indirect
github.com/cloudwego/hertz v0.7.3 // indirect
github.com/cloudwego/localsession v0.0.2 // indirect
github.com/cloudwego/netpoll v0.5.1 // indirect
github.com/cloudwego/thriftgo v0.3.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
github.com/hashicorp/consul/api v1.26.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
Expand All @@ -52,36 +60,62 @@ require (
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/serf v0.10.1 // indirect
github.com/hertz-contrib/obs-opentelemetry/provider v0.2.3 // indirect
github.com/iancoleman/strcase v0.2.0 // indirect
github.com/jhump/protoreflect v1.8.2 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kitex-contrib/monitor-prometheus v0.2.0 // indirect
github.com/kitex-contrib/obs-opentelemetry v0.2.5 // indirect
github.com/kitex-contrib/obs-opentelemetry/logging/zap v0.0.0-20231211030816-1f9e0f7bcee3 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/gls v0.0.0-20220109145502-612d0167dce5 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/oleiade/lane v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/tidwall/gjson v1.17.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect
go.opentelemetry.io/contrib/propagators/ot v1.20.0 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/arch v0.6.0 // indirect
golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 2486f02

Please sign in to comment.