-
Notifications
You must be signed in to change notification settings - Fork 0
/
unixfs.pb.go
121 lines (102 loc) · 2.76 KB
/
unixfs.pb.go
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Code generated by protoc-gen-gogo.
// source: unixfs.proto
// DO NOT EDIT!
/*
Package unixfs_pb is a generated protocol buffer package.
It is generated from these files:
unixfs.proto
It has these top-level messages:
Data
Metadata
*/
package unixfs_pb
import proto "github.com/ipfs/go-ipfs/Godeps/_workspace/src/code.google.com/p/gogoprotobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type Data_DataType int32
const (
Data_Raw Data_DataType = 0
Data_Directory Data_DataType = 1
Data_File Data_DataType = 2
Data_Metadata Data_DataType = 3
)
var Data_DataType_name = map[int32]string{
0: "Raw",
1: "Directory",
2: "File",
3: "Metadata",
}
var Data_DataType_value = map[string]int32{
"Raw": 0,
"Directory": 1,
"File": 2,
"Metadata": 3,
}
func (x Data_DataType) Enum() *Data_DataType {
p := new(Data_DataType)
*p = x
return p
}
func (x Data_DataType) String() string {
return proto.EnumName(Data_DataType_name, int32(x))
}
func (x *Data_DataType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Data_DataType_value, data, "Data_DataType")
if err != nil {
return err
}
*x = Data_DataType(value)
return nil
}
type Data struct {
Type *Data_DataType `protobuf:"varint,1,req,enum=unixfs.pb.Data_DataType" json:"Type,omitempty"`
Data []byte `protobuf:"bytes,2,opt" json:"Data,omitempty"`
Filesize *uint64 `protobuf:"varint,3,opt,name=filesize" json:"filesize,omitempty"`
Blocksizes []uint64 `protobuf:"varint,4,rep,name=blocksizes" json:"blocksizes,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Data) Reset() { *m = Data{} }
func (m *Data) String() string { return proto.CompactTextString(m) }
func (*Data) ProtoMessage() {}
func (m *Data) GetType() Data_DataType {
if m != nil && m.Type != nil {
return *m.Type
}
return Data_Raw
}
func (m *Data) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *Data) GetFilesize() uint64 {
if m != nil && m.Filesize != nil {
return *m.Filesize
}
return 0
}
func (m *Data) GetBlocksizes() []uint64 {
if m != nil {
return m.Blocksizes
}
return nil
}
type Metadata struct {
MimeType *string `protobuf:"bytes,1,req" json:"MimeType,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Metadata) Reset() { *m = Metadata{} }
func (m *Metadata) String() string { return proto.CompactTextString(m) }
func (*Metadata) ProtoMessage() {}
func (m *Metadata) GetMimeType() string {
if m != nil && m.MimeType != nil {
return *m.MimeType
}
return ""
}
func init() {
proto.RegisterEnum("unixfs.pb.Data_DataType", Data_DataType_name, Data_DataType_value)
}