mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
update protobuf/Makefile
This commit is contained in:
parent
5b616d65f7
commit
6054d53318
25
Makefile
25
Makefile
@ -1,7 +1,8 @@
|
||||
PROTO_DIR=./client/pb
|
||||
PROTO_IMPORT_PATH=./client
|
||||
PROTO_DIR=client/pb
|
||||
PROTO_OUTPUT_PATH=client
|
||||
PROTO_IMPORT_PATH=client
|
||||
|
||||
PROTO_FILES = \
|
||||
PROTO_FILES := \
|
||||
$(PROTO_DIR)/*.proto \
|
||||
$(PROTO_DIR)/channel/*.proto \
|
||||
$(PROTO_DIR)/cmd0x3f6/*.proto \
|
||||
@ -26,6 +27,20 @@ PROTO_FILES = \
|
||||
$(PROTO_DIR)/structmsg/*.proto \
|
||||
$(PROTO_DIR)/web/*.proto
|
||||
|
||||
proto:
|
||||
protoc --golite_out=. --golite_opt=paths=source_relative -I=$(PROTO_IMPORT_PATH) $(PROTO_FILES)
|
||||
PROTOC_GEN_GOLITE_VERSION := \
|
||||
$(shell grep "github.com/RomiChan/protobuf" go.mod | awk -F v '{print "v"$$2}')
|
||||
|
||||
.PHONY: protoc-gen-golite-version clean install-protoc-plugin proto
|
||||
.DEFAULT_GOAL := proto
|
||||
|
||||
protoc-gen-golite-version:
|
||||
@echo "Use protoc-gen-golite version: $(PROTOC_GEN_GOLITE_VERSION)"
|
||||
|
||||
clean:
|
||||
find . -name "*.pb.go" | xargs rm -f
|
||||
|
||||
install-protoc-plugin: protoc-gen-golite-version
|
||||
go install github.com/RomiChan/protobuf/cmd/protoc-gen-golite@$(PROTOC_GEN_GOLITE_VERSION)
|
||||
|
||||
proto: install-protoc-plugin
|
||||
protoc --golite_out=$(PROTO_IMPORT_PATH) --golite_opt=paths=source_relative -I=$(PROTO_IMPORT_PATH) $(PROTO_FILES)
|
||||
|
@ -16,18 +16,18 @@ const (
|
||||
)
|
||||
|
||||
type GetMessageRequest struct {
|
||||
SyncFlag proto.Option[int32] `protobuf:"varint,1,opt"`
|
||||
SyncCookie []byte `protobuf:"bytes,2,opt"`
|
||||
RambleFlag proto.Option[int32] `protobuf:"varint,3,opt"`
|
||||
LatestRambleNumber proto.Option[int32] `protobuf:"varint,4,opt"`
|
||||
OtherRambleNumber proto.Option[int32] `protobuf:"varint,5,opt"`
|
||||
OnlineSyncFlag proto.Option[int32] `protobuf:"varint,6,opt"`
|
||||
ContextFlag proto.Option[int32] `protobuf:"varint,7,opt"`
|
||||
WhisperSessionId proto.Option[int32] `protobuf:"varint,8,opt"`
|
||||
MsgReqType proto.Option[int32] `protobuf:"varint,9,opt"`
|
||||
PubaccountCookie []byte `protobuf:"bytes,10,opt"`
|
||||
MsgCtrlBuf []byte `protobuf:"bytes,11,opt"`
|
||||
ServerBuf []byte `protobuf:"bytes,12,opt"`
|
||||
SyncFlag proto.Option[SyncFlag] `protobuf:"varint,1,opt"`
|
||||
SyncCookie []byte `protobuf:"bytes,2,opt"`
|
||||
RambleFlag proto.Option[int32] `protobuf:"varint,3,opt"`
|
||||
LatestRambleNumber proto.Option[int32] `protobuf:"varint,4,opt"`
|
||||
OtherRambleNumber proto.Option[int32] `protobuf:"varint,5,opt"`
|
||||
OnlineSyncFlag proto.Option[int32] `protobuf:"varint,6,opt"`
|
||||
ContextFlag proto.Option[int32] `protobuf:"varint,7,opt"`
|
||||
WhisperSessionId proto.Option[int32] `protobuf:"varint,8,opt"`
|
||||
MsgReqType proto.Option[int32] `protobuf:"varint,9,opt"`
|
||||
PubaccountCookie []byte `protobuf:"bytes,10,opt"`
|
||||
MsgCtrlBuf []byte `protobuf:"bytes,11,opt"`
|
||||
ServerBuf []byte `protobuf:"bytes,12,opt"`
|
||||
}
|
||||
|
||||
type SendMessageRequest struct {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-golite. DO NOT EDIT.
|
||||
// source: pb/oidb/oidb0xD79.proto
|
||||
// source: pb/oidb/oidb0xd79.proto
|
||||
|
||||
package oidb
|
||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module github.com/Mrs4s/MiraiGo
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/RomiChan/protobuf v0.1.1-0.20220523101132-5546fc25db37
|
||||
github.com/RomiChan/protobuf v0.1.1-0.20220524030518-4f349493f9da
|
||||
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c
|
||||
github.com/fumiama/imgsz v0.0.2
|
||||
github.com/pierrec/lz4/v4 v4.1.11
|
||||
|
4
go.sum
4
go.sum
@ -1,5 +1,5 @@
|
||||
github.com/RomiChan/protobuf v0.1.1-0.20220523101132-5546fc25db37 h1:MtLqymjslqAWUYMHqamYI9KKXq+am9JOyLIcSDWE3Ak=
|
||||
github.com/RomiChan/protobuf v0.1.1-0.20220523101132-5546fc25db37/go.mod h1:2Ie+hdBFQpQFDHfeklgxoFmQRCE7O+KwFpISeXq7OwA=
|
||||
github.com/RomiChan/protobuf v0.1.1-0.20220524030518-4f349493f9da h1:T+Sc+QtOfpIRnfnOXaToyLvxmUmFwF2iaqxpJddI4Cc=
|
||||
github.com/RomiChan/protobuf v0.1.1-0.20220524030518-4f349493f9da/go.mod h1:2Ie+hdBFQpQFDHfeklgxoFmQRCE7O+KwFpISeXq7OwA=
|
||||
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c h1:cNPOdTNiVwxLpROLjXCgbIPvdkE+BwvxDvgmdYmWx6Q=
|
||||
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c/go.mod h1:KqZzu7slNKROh3TSYEH/IUMG6f4M+1qubZ5e52QypsE=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
Loading…
x
Reference in New Issue
Block a user