feat: add ability to regenerate proto files (#76)

This commit is contained in:
Anthony Laibe 2021-10-14 11:03:25 +02:00 committed by GitHub
parent 2df2289972
commit 54a93a60c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1489 additions and 74 deletions

View File

@ -20,3 +20,6 @@ lint:
test:
go test -v -failfast ./...
generate:
go generate ./waku/v2/protocol/pb/generate.go

1
go.mod
View File

@ -8,6 +8,7 @@ require (
contrib.go.opencensus.io/exporter/prometheus v0.3.0
github.com/cruxic/go-hmac-drbg v0.0.0-20170206035330-84c46983886d
github.com/ethereum/go-ethereum v1.10.4
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.2
github.com/ipfs/go-ds-sql v0.2.0
github.com/ipfs/go-log v1.0.5

9
waku/tools/tools.go Normal file
View File

@ -0,0 +1,9 @@
//go:build tools
// +build tools
// tools is a dummy package that will be ignored for builds, but included for dependencies
package tools
import (
_ "github.com/gogo/protobuf/protoc-gen-gofast"
)

View File

@ -0,0 +1,6 @@
package pb
//go:generate protoc -I. --gofast_out=. ./waku_filter.proto
//go:generate protoc -I. --gofast_out=. ./waku_lightpush.proto
//go:generate protoc -I. --gofast_out=. ./waku_message.proto
//go:generate protoc -I. --gofast_out=. ./waku_store.proto

View File

@ -103,25 +103,25 @@ func (m *WakuMessage) GetProof() []byte {
}
func init() {
proto.RegisterType((*WakuMessage)(nil), "protocol.WakuMessage")
proto.RegisterType((*WakuMessage)(nil), "pb.WakuMessage")
}
func init() { proto.RegisterFile("waku_message.proto", fileDescriptor_6f0a20862b3bf714) }
var fileDescriptor_6f0a20862b3bf714 = []byte{
// 186 bytes of a gzipped FileDescriptorProto
// 184 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0x4f, 0xcc, 0x2e,
0x8d, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0xd5, 0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x5d, 0xea, 0x0b, 0x91, 0x11, 0x92,
0xe0, 0x62, 0x2f, 0x48, 0xac, 0xcc, 0xc9, 0x4f, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09,
0x82, 0x71, 0x85, 0x94, 0xb8, 0x78, 0x92, 0xf3, 0xf3, 0x4a, 0x52, 0xf3, 0x4a, 0x42, 0xf2, 0x0b,
0x32, 0x93, 0x25, 0x98, 0x14, 0x18, 0x35, 0x38, 0x83, 0x50, 0xc4, 0x40, 0xba, 0xcb, 0x52, 0x8b,
0x8a, 0x33, 0xf3, 0xf3, 0x24, 0x98, 0x15, 0x18, 0x35, 0x78, 0x83, 0x60, 0x5c, 0x21, 0x19, 0x2e,
0xce, 0x92, 0xcc, 0xdc, 0xd4, 0xe2, 0x92, 0xc4, 0xdc, 0x02, 0x09, 0x16, 0x05, 0x46, 0x0d, 0xc6,
0x20, 0x84, 0x80, 0x90, 0x08, 0x17, 0x6b, 0x41, 0x51, 0x7e, 0x7e, 0x9a, 0x84, 0x28, 0xd8, 0x4e,
0x08, 0xc7, 0x49, 0xe0, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63,
0x9c, 0xf1, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0xec, 0x70, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff,
0x0a, 0xc6, 0x91, 0x28, 0xce, 0x00, 0x00, 0x00,
}
func (m *WakuMessage) Marshal() (dAtA []byte, err error) {

File diff suppressed because it is too large Load Diff