// Code generated by protoc-gen-go. // source: data.proto // DO NOT EDIT! /* Package merkledag is a generated protocol buffer package. It is generated from these files: data.proto It has these top-level messages: PBData */ package merkledag import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/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 PBData_DataType int32 const ( PBData_Raw PBData_DataType = 0 PBData_Directory PBData_DataType = 1 PBData_File PBData_DataType = 2 ) var PBData_DataType_name = map[int32]string{ 0: "Raw", 1: "Directory", 2: "File", } var PBData_DataType_value = map[string]int32{ "Raw": 0, "Directory": 1, "File": 2, } func (x PBData_DataType) Enum() *PBData_DataType { p := new(PBData_DataType) *p = x return p } func (x PBData_DataType) String() string { return proto.EnumName(PBData_DataType_name, int32(x)) } func (x *PBData_DataType) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(PBData_DataType_value, data, "PBData_DataType") if err != nil { return err } *x = PBData_DataType(value) return nil } type PBData struct { Type *PBData_DataType `protobuf:"varint,1,req,enum=merkledag.PBData_DataType" json:"Type,omitempty"` Data []byte `protobuf:"bytes,2,opt" json:"Data,omitempty"` Filesize *uint64 `protobuf:"varint,3,opt,name=filesize" json:"filesize,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *PBData) Reset() { *m = PBData{} } func (m *PBData) String() string { return proto.CompactTextString(m) } func (*PBData) ProtoMessage() {} func (m *PBData) GetType() PBData_DataType { if m != nil && m.Type != nil { return *m.Type } return PBData_Raw } func (m *PBData) GetData() []byte { if m != nil { return m.Data } return nil } func (m *PBData) GetFilesize() uint64 { if m != nil && m.Filesize != nil { return *m.Filesize } return 0 } func init() { proto.RegisterEnum("merkledag.PBData_DataType", PBData_DataType_name, PBData_DataType_value) }