// Code generated by protoc-gen-go. // source: messages.proto // DO NOT EDIT! /* Package dht is a generated protocol buffer package. It is generated from these files: messages.proto It has these top-level messages: DHTMessage */ package dht import proto "code.google.com/p/goprotobuf/proto" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = math.Inf type DHTMessage_MessageType int32 const ( DHTMessage_PUT_VALUE DHTMessage_MessageType = 0 DHTMessage_GET_VALUE DHTMessage_MessageType = 1 DHTMessage_ADD_PROVIDER DHTMessage_MessageType = 2 DHTMessage_GET_PROVIDERS DHTMessage_MessageType = 3 DHTMessage_FIND_NODE DHTMessage_MessageType = 4 DHTMessage_PING DHTMessage_MessageType = 5 DHTMessage_DIAGNOSTIC DHTMessage_MessageType = 6 ) var DHTMessage_MessageType_name = map[int32]string{ 0: "PUT_VALUE", 1: "GET_VALUE", 2: "ADD_PROVIDER", 3: "GET_PROVIDERS", 4: "FIND_NODE", 5: "PING", 6: "DIAGNOSTIC", } var DHTMessage_MessageType_value = map[string]int32{ "PUT_VALUE": 0, "GET_VALUE": 1, "ADD_PROVIDER": 2, "GET_PROVIDERS": 3, "FIND_NODE": 4, "PING": 5, "DIAGNOSTIC": 6, } func (x DHTMessage_MessageType) Enum() *DHTMessage_MessageType { p := new(DHTMessage_MessageType) *p = x return p } func (x DHTMessage_MessageType) String() string { return proto.EnumName(DHTMessage_MessageType_name, int32(x)) } func (x *DHTMessage_MessageType) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(DHTMessage_MessageType_value, data, "DHTMessage_MessageType") if err != nil { return err } *x = DHTMessage_MessageType(value) return nil } type DHTMessage struct { Type *DHTMessage_MessageType `protobuf:"varint,1,req,name=type,enum=dht.DHTMessage_MessageType" json:"type,omitempty"` Key *string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` Id *uint64 `protobuf:"varint,4,req,name=id" json:"id,omitempty"` Response *bool `protobuf:"varint,5,opt,name=response" json:"response,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *DHTMessage) Reset() { *m = DHTMessage{} } func (m *DHTMessage) String() string { return proto.CompactTextString(m) } func (*DHTMessage) ProtoMessage() {} func (m *DHTMessage) GetType() DHTMessage_MessageType { if m != nil && m.Type != nil { return *m.Type } return DHTMessage_PUT_VALUE } func (m *DHTMessage) GetKey() string { if m != nil && m.Key != nil { return *m.Key } return "" } func (m *DHTMessage) GetValue() []byte { if m != nil { return m.Value } return nil } func (m *DHTMessage) GetId() uint64 { if m != nil && m.Id != nil { return *m.Id } return 0 } func (m *DHTMessage) GetResponse() bool { if m != nil && m.Response != nil { return *m.Response } return false } func init() { proto.RegisterEnum("dht.DHTMessage_MessageType", DHTMessage_MessageType_name, DHTMessage_MessageType_value) }