data.pb.go 1.89 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
// 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 "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"`
	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 init() {
	proto.RegisterEnum("merkledag.PBData_DataType", PBData_DataType_name, PBData_DataType_value)
}