mirror of
https://github.com/vacp2p/mvds.git
synced 2026-01-09 12:07:55 -05:00
adds protobuf to makefile (#45)
This commit is contained in:
7
Makefile
Normal file
7
Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
SHELL := /bin/bash
|
||||
|
||||
GO111MODULE = on
|
||||
|
||||
protobuf:
|
||||
protoc --go_out=. ./protobuf/*.proto
|
||||
.PHONY: protobuf
|
||||
@@ -1,286 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: sync.proto
|
||||
|
||||
package protobuf
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Payload struct {
|
||||
Ack *Ack `protobuf:"bytes,1,opt,name=ack,proto3" json:"ack,omitempty"`
|
||||
Offer *Offer `protobuf:"bytes,2,opt,name=offer,proto3" json:"offer,omitempty"`
|
||||
Request *Request `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
|
||||
Messages []*Message `protobuf:"bytes,4,rep,name=messages,proto3" json:"messages,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Payload) Reset() { *m = Payload{} }
|
||||
func (m *Payload) String() string { return proto.CompactTextString(m) }
|
||||
func (*Payload) ProtoMessage() {}
|
||||
func (*Payload) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5273b98214de8075, []int{0}
|
||||
}
|
||||
|
||||
func (m *Payload) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Payload.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Payload.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Payload) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Payload.Merge(m, src)
|
||||
}
|
||||
func (m *Payload) XXX_Size() int {
|
||||
return xxx_messageInfo_Payload.Size(m)
|
||||
}
|
||||
func (m *Payload) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Payload.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Payload proto.InternalMessageInfo
|
||||
|
||||
func (m *Payload) GetAck() *Ack {
|
||||
if m != nil {
|
||||
return m.Ack
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Payload) GetOffer() *Offer {
|
||||
if m != nil {
|
||||
return m.Offer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Payload) GetRequest() *Request {
|
||||
if m != nil {
|
||||
return m.Request
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Payload) GetMessages() []*Message {
|
||||
if m != nil {
|
||||
return m.Messages
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Ack struct {
|
||||
Id [][]byte `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Ack) Reset() { *m = Ack{} }
|
||||
func (m *Ack) String() string { return proto.CompactTextString(m) }
|
||||
func (*Ack) ProtoMessage() {}
|
||||
func (*Ack) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5273b98214de8075, []int{1}
|
||||
}
|
||||
|
||||
func (m *Ack) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Ack.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Ack.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Ack) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Ack.Merge(m, src)
|
||||
}
|
||||
func (m *Ack) XXX_Size() int {
|
||||
return xxx_messageInfo_Ack.Size(m)
|
||||
}
|
||||
func (m *Ack) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Ack.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Ack proto.InternalMessageInfo
|
||||
|
||||
func (m *Ack) GetId() [][]byte {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
GroupId []byte `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
|
||||
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Message) Reset() { *m = Message{} }
|
||||
func (m *Message) String() string { return proto.CompactTextString(m) }
|
||||
func (*Message) ProtoMessage() {}
|
||||
func (*Message) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5273b98214de8075, []int{2}
|
||||
}
|
||||
|
||||
func (m *Message) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Message.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Message) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Message.Merge(m, src)
|
||||
}
|
||||
func (m *Message) XXX_Size() int {
|
||||
return xxx_messageInfo_Message.Size(m)
|
||||
}
|
||||
func (m *Message) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Message.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Message proto.InternalMessageInfo
|
||||
|
||||
func (m *Message) GetGroupId() []byte {
|
||||
if m != nil {
|
||||
return m.GroupId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetTimestamp() int64 {
|
||||
if m != nil {
|
||||
return m.Timestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Message) GetBody() []byte {
|
||||
if m != nil {
|
||||
return m.Body
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Offer struct {
|
||||
Id [][]byte `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Offer) Reset() { *m = Offer{} }
|
||||
func (m *Offer) String() string { return proto.CompactTextString(m) }
|
||||
func (*Offer) ProtoMessage() {}
|
||||
func (*Offer) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5273b98214de8075, []int{3}
|
||||
}
|
||||
|
||||
func (m *Offer) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Offer.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Offer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Offer.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Offer) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Offer.Merge(m, src)
|
||||
}
|
||||
func (m *Offer) XXX_Size() int {
|
||||
return xxx_messageInfo_Offer.Size(m)
|
||||
}
|
||||
func (m *Offer) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Offer.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Offer proto.InternalMessageInfo
|
||||
|
||||
func (m *Offer) GetId() [][]byte {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
Id [][]byte `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Request) Reset() { *m = Request{} }
|
||||
func (m *Request) String() string { return proto.CompactTextString(m) }
|
||||
func (*Request) ProtoMessage() {}
|
||||
func (*Request) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5273b98214de8075, []int{4}
|
||||
}
|
||||
|
||||
func (m *Request) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Request.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Request.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Request) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Request.Merge(m, src)
|
||||
}
|
||||
func (m *Request) XXX_Size() int {
|
||||
return xxx_messageInfo_Request.Size(m)
|
||||
}
|
||||
func (m *Request) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Request.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Request proto.InternalMessageInfo
|
||||
|
||||
func (m *Request) GetId() [][]byte {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Payload)(nil), "mvds.Payload")
|
||||
proto.RegisterType((*Ack)(nil), "mvds.Ack")
|
||||
proto.RegisterType((*Message)(nil), "mvds.Message")
|
||||
proto.RegisterType((*Offer)(nil), "mvds.Offer")
|
||||
proto.RegisterType((*Request)(nil), "mvds.Request")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("sync.proto", fileDescriptor_5273b98214de8075) }
|
||||
|
||||
var fileDescriptor_5273b98214de8075 = []byte{
|
||||
// 244 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xb1, 0x4e, 0xc3, 0x30,
|
||||
0x10, 0x40, 0x95, 0x38, 0xc5, 0xed, 0x35, 0x30, 0x9c, 0x84, 0x70, 0x05, 0x43, 0xc8, 0x42, 0x58,
|
||||
0x32, 0xc0, 0x17, 0x74, 0x64, 0x40, 0xa0, 0x1b, 0x58, 0x91, 0x1b, 0xbb, 0x55, 0x14, 0x82, 0x43,
|
||||
0x9c, 0x22, 0xe5, 0x63, 0xf8, 0x57, 0x94, 0x73, 0xa1, 0x12, 0x6c, 0xf6, 0x7b, 0x4f, 0xf2, 0x9d,
|
||||
0x01, 0xfc, 0xf8, 0x5e, 0x95, 0x5d, 0xef, 0x06, 0x87, 0x49, 0xfb, 0x69, 0x7c, 0xfe, 0x15, 0x81,
|
||||
0x7c, 0xd6, 0xe3, 0x9b, 0xd3, 0x06, 0x2f, 0x41, 0xe8, 0xaa, 0x51, 0x51, 0x16, 0x15, 0xcb, 0xbb,
|
||||
0x45, 0x39, 0xf9, 0x72, 0x5d, 0x35, 0x34, 0x51, 0xbc, 0x86, 0x99, 0xdb, 0x6e, 0x6d, 0xaf, 0x62,
|
||||
0xd6, 0xcb, 0xa0, 0x9f, 0x26, 0x44, 0xc1, 0xe0, 0x0d, 0xc8, 0xde, 0x7e, 0xec, 0xad, 0x1f, 0x94,
|
||||
0xe0, 0xe8, 0x34, 0x44, 0x14, 0x20, 0xfd, 0x58, 0xbc, 0x85, 0x79, 0x6b, 0xbd, 0xd7, 0x3b, 0xeb,
|
||||
0x55, 0x92, 0x89, 0x63, 0xf9, 0x18, 0x28, 0xfd, 0xea, 0xfc, 0x1c, 0xc4, 0xba, 0x6a, 0xf0, 0x0c,
|
||||
0xe2, 0xda, 0xa8, 0x28, 0x13, 0x45, 0x4a, 0x71, 0x6d, 0xf2, 0x17, 0x90, 0x87, 0x16, 0x57, 0x30,
|
||||
0xdf, 0xf5, 0x6e, 0xdf, 0xbd, 0x72, 0x10, 0x15, 0x29, 0x49, 0xbe, 0x3f, 0x18, 0xbc, 0x82, 0xc5,
|
||||
0x50, 0xb7, 0xd6, 0x0f, 0xba, 0xed, 0x78, 0x6e, 0x41, 0x47, 0x80, 0x08, 0xc9, 0xc6, 0x99, 0x91,
|
||||
0x67, 0x4d, 0x89, 0xcf, 0xf9, 0x05, 0xcc, 0x78, 0xa5, 0x7f, 0x0f, 0xae, 0x40, 0x1e, 0xd6, 0xf8,
|
||||
0xab, 0x36, 0x27, 0xfc, 0x9f, 0xf7, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xc1, 0x4e, 0x78,
|
||||
0x5d, 0x01, 0x00, 0x00,
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package mvds;
|
||||
option go_package = "protobuf";
|
||||
|
||||
message Payload {
|
||||
Ack ack = 1;
|
||||
|
||||
Reference in New Issue
Block a user