Add makefile and proto generating
This commit is contained in:
parent
210718c79b
commit
53a9bb5fc5
22
Makefile
Normal file
22
Makefile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
export GOPRIVATE=github.com/anytypeio
|
||||||
|
|
||||||
|
ifndef $(GOPATH)
|
||||||
|
GOPATH=$(shell go env GOPATH)
|
||||||
|
export GOPATH
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef $(GOROOT)
|
||||||
|
GOROOT=$(shell go env GOROOT)
|
||||||
|
export GOROOT
|
||||||
|
endif
|
||||||
|
|
||||||
|
export PATH=$(GOPATH)/bin:$(shell echo $$PATH)
|
||||||
|
|
||||||
|
protos-go:
|
||||||
|
@echo 'Generating protobuf packages (Go)...'
|
||||||
|
$(eval P_TIMESTAMP := Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types)
|
||||||
|
$(eval P_STRUCT := Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types)
|
||||||
|
@$(eval P_PROTOS := Mdata/pb/protos/aclchanges.proto=github.com/anytypeio/go-anytype-infrastructure-experiments/data/pb)
|
||||||
|
|
||||||
|
$(eval PKGMAP := $$(P_TIMESTAMP),$$(P_STRUCT),$$(P_PROTOS))
|
||||||
|
GOGO_NO_UNDERSCORE=1 GOGO_EXPORT_ONEOF_INTERFACE=1 protoc --gogofaster_out=$(PKGMAP):./data/pb data/pb/protos/*.*; mv data/pb/data/pb/protos/*.go data/pb; rm -rf data/pb/data
|
||||||
4732
data/pb/aclchanges.pb.go
Normal file
4732
data/pb/aclchanges.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,8 +2,6 @@ syntax = "proto3";
|
|||||||
package anytype;
|
package anytype;
|
||||||
option go_package = "pb";
|
option go_package = "pb";
|
||||||
|
|
||||||
import "pb/protos/changes.proto";
|
|
||||||
|
|
||||||
// the element of change tree used to store and internal apply smartBlock history
|
// the element of change tree used to store and internal apply smartBlock history
|
||||||
message ACLChange {
|
message ACLChange {
|
||||||
repeated string treeHeadIds = 1;
|
repeated string treeHeadIds = 1;
|
||||||
@ -28,12 +26,6 @@ message ACLChange {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message ChangeData {
|
|
||||||
anytype.Change.Snapshot snapshot = 1;
|
|
||||||
repeated anytype.Change.Content content = 2;
|
|
||||||
repeated anytype.Change.FileKeys fileKeys = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ACLData {
|
message ACLData {
|
||||||
ACLSnapshot aclSnapshot = 1;
|
ACLSnapshot aclSnapshot = 1;
|
||||||
repeated ACLContentValue aclContent = 2;
|
repeated ACLContentValue aclContent = 2;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user