Skip to content

Commit

Permalink
First public release
Browse files Browse the repository at this point in the history
  • Loading branch information
yaronsumel committed Aug 14, 2017
0 parents commit 4a713f4
Show file tree
Hide file tree
Showing 86 changed files with 13,696 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .gitignore
@@ -0,0 +1,30 @@
# Binaries for programs and plugins
*.exe*
*.dll
*.so
*.dylib

# local configs
*.json
*.yaml


# local keys
id_rsa
*.crt
*.key
*.crl
*.csr

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

# IDE
.idea/
convey.bat
1 change: 1 addition & 0 deletions CONTRIBUTING.md
@@ -0,0 +1 @@

661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions Makefile
@@ -0,0 +1,96 @@
# Digota <http://digota.com> - eCommerce microservice
# Copyright (C) 2017 Yaron Sumel <yaron@digota.com>. All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

go:

# clean old *.pb.go
(rm -f payment/paymentpb/payment.pb.go \
rm -f order/orderpb/order.pb.go \
rm -f sku/skupb/sku.pb.go \
rm -f product/productpb/product.pb.go )

# generate payment pb
(protoc \
-I=. \
-I=../../../ \
-I=../../gogo/protobuf/protobuf \
--gogo_out=plugins=grpc:../../../ \
payment/paymentpb/payment.proto)

# generate order pb
(protoc \
-I=. \
-I=../../../ \
-I=../../gogo/protobuf/protobuf \
--gogo_out=plugins=grpc:../../../ \
order/orderpb/order.proto)

# generate sku pb
(protoc \
-I=. \
-I=../../../ \
-I=../../gogo/protobuf/protobuf \
--gogo_out=plugins=grpc:../../../ \
sku/skupb/sku.proto)

# generate product pb
(protoc \
-I=. \
-I=../../../ \
-I=../../gogo/protobuf/protobuf \
--gogo_out=plugins=grpc:../../../ \
product/productpb/product.proto)

php:

# create _php folder
(mkdir -p _php && rm -rf _php/* )

# generate payment pb
(protoc \
-I=. \
-I=../../../ \
-I=../../gogo/protobuf/protobuf \
--php_out=_php \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
payment/paymentpb/payment.proto)

# generate order pb
(protoc \
-I=. \
-I=../../../ \
-I=../../gogo/protobuf/protobuf \
--php_out=_php \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
order/orderpb/order.proto)

# generate sku pb
(protoc \
-I=. \
-I=../../../ \
-I=../../gogo/protobuf/protobuf \
--php_out=_php \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
sku/skupb/sku.proto)

# generate product pb
(protoc \
-I=. \
-I=../../../ \
-I=../../gogo/protobuf/protobuf \
--php_out=_php \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
product/productpb/product.proto)
68 changes: 68 additions & 0 deletions Makefile.bat
@@ -0,0 +1,68 @@
:: Digota <http://digota.com> - eCommerce microservice
:: Copyright (C) 2017 Yaron Sumel <yaron@digota.com>. All Rights Reserved.
::
:: This program is free software: you can redistribute it and/or modify
:: it under the terms of the GNU Affero General Public License as published
:: by the Free Software Foundation, either version 3 of the License, or
:: (at your option) any later version.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU Affero General Public License for more details.
::
:: You should have received a copy of the GNU Affero General Public License
:: along with this program. If not, see <http://www.gnu.org/licenses/>.

:: pb.bat is protoBuff generator helper for windows, will pause and
:: echo any error. Usage: "> pb.bat"

:: @echo off
cd /d "%GOPATH%\src\github.com\digota\digota"

:: sku
DEL "sku\skupb\sku.pb.go" || pause
DEL "sku\skupb\sku.pb.gw.go" || pause

(protoc ^
-I=. ^
-I=../../../ ^
-I=../../gogo/protobuf/protobuf ^
--gogo_out=plugins=grpc:../../../ ^
sku/skupb/sku.proto || pause)

:: order
DEL "order\orderpb\order.pb.go" || pause
DEL "order\orderpb\order.pb.gw.go" || pause

(protoc ^
-I=. ^
-I=../../../ ^
-I=../../gogo/protobuf/protobuf ^
--gogo_out=plugins=grpc:../../../ ^
order/orderpb/order.proto || pause)

:: payment
DEL "payment\paymentpb\payment.pb.go" || pause
DEL "payment\paymentpb\payment.pb.gw.go" || pause

(protoc ^
-I=. ^
-I=../../../ ^
-I=../../gogo/protobuf/protobuf ^
--gogo_out=plugins=grpc:../../../ ^
payment/paymentpb/payment.proto || pause)

:: product
DEL "product\productpb\product.pb.go" || pause
DEL "product\productpb\product.pb.gw.go" || pause

(protoc ^
-I=. ^
-I=../../../ ^
-I=../../gogo/protobuf/protobuf ^
--gogo_out=plugins=grpc:../../../ ^
product\productpb\product.proto || pause)

:: pause
exit

0 comments on commit 4a713f4

Please sign in to comment.