aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-11-12 12:03:15 +0000
committerterminaldweller <thabogre@gmail.com>2021-11-12 12:03:15 +0000
commit3c24c7ba319e277414455d68360043e155d7a3ca (patch)
tree3df683631f75eca74f77006b3d5eb3cb3e3f188c
parentchanged the module name (diff)
downloadgrpc-3c24c7ba319e277414455d68360043e155d7a3ca.tar.gz
grpc-3c24c7ba319e277414455d68360043e155d7a3ca.zip
updates and fixesv1.0.0
Diffstat (limited to '')
-rw-r--r--telebot/go.mod8
-rw-r--r--telebot/go.sum11
-rw-r--r--telebot/makefile8
-rw-r--r--telebot/protobuf/v1/telegram.pb.go (renamed from telebot/protobuf/telegram.pb.go)9
-rw-r--r--telebot/protobuf/v1/telegram.proto (renamed from telebot/protobuf/telegram.proto)2
5 files changed, 31 insertions, 7 deletions
diff --git a/telebot/go.mod b/telebot/go.mod
new file mode 100644
index 0000000..c010507
--- /dev/null
+++ b/telebot/go.mod
@@ -0,0 +1,8 @@
+module github.com/terminaldweller/grpc/telebot/protobuf/v1
+
+go 1.15
+
+require (
+ github.com/golang/protobuf v1.5.2
+ google.golang.org/protobuf v1.27.1
+)
diff --git a/telebot/go.sum b/telebot/go.sum
new file mode 100644
index 0000000..85ba719
--- /dev/null
+++ b/telebot/go.sum
@@ -0,0 +1,11 @@
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
+google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
diff --git a/telebot/makefile b/telebot/makefile
index af3354d..9f91c59 100644
--- a/telebot/makefile
+++ b/telebot/makefile
@@ -1,5 +1,5 @@
-DST_DIR?=./protobuf
-SRC_DIR?=./protobuf
+DST_DIR?=./protobuf/v1
+SRC_DIR?=./protobuf/v1
PROTOBUF_SRC_LIST:=$(shell find ./protobuf -name '*.proto' )
ARTIFACT_LIST:=$(patsubst %.proto, %.pb.go, $(shell find ./protobuf -name '*.proto'))
@@ -8,7 +8,9 @@ DEFAULT: default
default: $(ARTIFACT_LIST)
$(SRC_DIR)/%.pb.go:$(SRC_DIR)/%.proto
- protoc --proto_path=$(SRC_DIR) --go_out=$(DST_DIR) $<
+ protoc --proto_path=$(SRC_DIR) --go_out=$(DST_DIR) --go_opt=paths=source_relative $<
+ if [ -d go.mod ];then : else;go mod init github.com/terminaldweller/grpc/telebot/protobuf/v1;fi
+ go mod tidy
clean:
- rm $(ARTIFACT_LIST)
diff --git a/telebot/protobuf/telegram.pb.go b/telebot/protobuf/v1/telegram.pb.go
index 0fc0595..ab46f67 100644
--- a/telebot/protobuf/telegram.pb.go
+++ b/telebot/protobuf/v1/telegram.pb.go
@@ -4,7 +4,7 @@
// protoc v3.15.6
// source: telegram.proto
-package protobuf
+package v1
import (
proto "github.com/golang/protobuf/proto"
@@ -171,8 +171,11 @@ var file_telegram_proto_rawDesc = []byte{
0x64, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x64, 0x2e, 0x4e, 0x6f,
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x73, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x64, 0x77, 0x65, 0x6c, 0x6c, 0x65, 0x72,
+ 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x62, 0x6f, 0x74, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
}
var (
diff --git a/telebot/protobuf/telegram.proto b/telebot/protobuf/v1/telegram.proto
index d01fa9a..9a8ab6f 100644
--- a/telebot/protobuf/telegram.proto
+++ b/telebot/protobuf/v1/telegram.proto
@@ -2,7 +2,7 @@ syntax= "proto3";
package hived;
import "google/protobuf/timestamp.proto";
-option go_package ="github.com/terminaldweller/grpc/telebot/protobuf/telegram.pb.go";
+option go_package = "github.com/terminaldweller/grpc/telebot/protobuf/v1";
message NotificationRequest {
reserved 4 to 7;