1// Code generated by protoc-gen-go.
2// source: index.proto
3// DO NOT EDIT!
4
5package protobuf
6
7import proto "github.com/golang/protobuf/proto"
8import math "math"
9
10// Reference imports to suppress errors if they are not otherwise used.
11var _ = proto.Marshal
12var _ = math.Inf
13
14// IndexDefn will be in one of the following state
15type IndexState int32
16
17const (
18	// Create index accepted, replicated and response sent back to admin
19	// console.
20	IndexState_IndexInitial IndexState = 1
21	// Index DDL replicated, and then communicated to participating indexers.
22	IndexState_IndexPending IndexState = 2
23	// Initial-load request received from admin console, DDL replicated,
24	// loading status communicated with participating indexer and
25	// initial-load request is posted to projector.
26	IndexState_IndexLoading IndexState = 3
27	// Initial-loading is completed for this index from all partiticipating
28	// indexers, DDL replicated, and finaly initial-load stream is shutdown.
29	IndexState_IndexActive IndexState = 4
30	// Delete index request is received, replicated and then communicated with
31	// each participating indexer nodes.
32	IndexState_IndexDeleted IndexState = 5
33)
34
35var IndexState_name = map[int32]string{
36	1: "IndexInitial",
37	2: "IndexPending",
38	3: "IndexLoading",
39	4: "IndexActive",
40	5: "IndexDeleted",
41}
42var IndexState_value = map[string]int32{
43	"IndexInitial": 1,
44	"IndexPending": 2,
45	"IndexLoading": 3,
46	"IndexActive":  4,
47	"IndexDeleted": 5,
48}
49
50func (x IndexState) Enum() *IndexState {
51	p := new(IndexState)
52	*p = x
53	return p
54}
55func (x IndexState) String() string {
56	return proto.EnumName(IndexState_name, int32(x))
57}
58func (x *IndexState) UnmarshalJSON(data []byte) error {
59	value, err := proto.UnmarshalJSONEnum(IndexState_value, data, "IndexState")
60	if err != nil {
61		return err
62	}
63	*x = IndexState(value)
64	return nil
65}
66
67// List of possible index storage algorithms.
68type StorageType int32
69
70const (
71	StorageType_forestdb         StorageType = 1
72	StorageType_memdb            StorageType = 2
73	StorageType_memory_optimized StorageType = 3
74)
75
76var StorageType_name = map[int32]string{
77	1: "forestdb",
78	2: "memdb",
79	3: "memory_optimized",
80}
81var StorageType_value = map[string]int32{
82	"forestdb":         1,
83	"memdb":            2,
84	"memory_optimized": 3,
85}
86
87func (x StorageType) Enum() *StorageType {
88	p := new(StorageType)
89	*p = x
90	return p
91}
92func (x StorageType) String() string {
93	return proto.EnumName(StorageType_name, int32(x))
94}
95func (x *StorageType) UnmarshalJSON(data []byte) error {
96	value, err := proto.UnmarshalJSONEnum(StorageType_value, data, "StorageType")
97	if err != nil {
98		return err
99	}
100	*x = StorageType(value)
101	return nil
102}
103
104// Type of expression used to evaluate document.
105type ExprType int32
106
107const (
108	ExprType_JAVASCRIPT ExprType = 1
109	ExprType_N1QL       ExprType = 2
110)
111
112var ExprType_name = map[int32]string{
113	1: "JAVASCRIPT",
114	2: "N1QL",
115}
116var ExprType_value = map[string]int32{
117	"JAVASCRIPT": 1,
118	"N1QL":       2,
119}
120
121func (x ExprType) Enum() *ExprType {
122	p := new(ExprType)
123	*p = x
124	return p
125}
126func (x ExprType) String() string {
127	return proto.EnumName(ExprType_name, int32(x))
128}
129func (x *ExprType) UnmarshalJSON(data []byte) error {
130	value, err := proto.UnmarshalJSONEnum(ExprType_value, data, "ExprType")
131	if err != nil {
132		return err
133	}
134	*x = ExprType(value)
135	return nil
136}
137
138// Type of topology, including paritition type to be used for the index.
139type PartitionScheme int32
140
141const (
142	PartitionScheme_TEST   PartitionScheme = 1
143	PartitionScheme_SINGLE PartitionScheme = 2
144	PartitionScheme_KEY    PartitionScheme = 3
145	PartitionScheme_HASH   PartitionScheme = 4
146	PartitionScheme_RANGE  PartitionScheme = 5
147)
148
149var PartitionScheme_name = map[int32]string{
150	1: "TEST",
151	2: "SINGLE",
152	3: "KEY",
153	4: "HASH",
154	5: "RANGE",
155}
156var PartitionScheme_value = map[string]int32{
157	"TEST":   1,
158	"SINGLE": 2,
159	"KEY":    3,
160	"HASH":   4,
161	"RANGE":  5,
162}
163
164func (x PartitionScheme) Enum() *PartitionScheme {
165	p := new(PartitionScheme)
166	*p = x
167	return p
168}
169func (x PartitionScheme) String() string {
170	return proto.EnumName(PartitionScheme_name, int32(x))
171}
172func (x *PartitionScheme) UnmarshalJSON(data []byte) error {
173	value, err := proto.UnmarshalJSONEnum(PartitionScheme_value, data, "PartitionScheme")
174	if err != nil {
175		return err
176	}
177	*x = PartitionScheme(value)
178	return nil
179}
180
181// Type of Hash scheme for partitioned index
182type HashScheme int32
183
184const (
185	HashScheme_CRC32 HashScheme = 0
186)
187
188var HashScheme_name = map[int32]string{
189	0: "CRC32",
190}
191var HashScheme_value = map[string]int32{
192	"CRC32": 0,
193}
194
195func (x HashScheme) Enum() *HashScheme {
196	p := new(HashScheme)
197	*p = x
198	return p
199}
200func (x HashScheme) String() string {
201	return proto.EnumName(HashScheme_name, int32(x))
202}
203func (x *HashScheme) UnmarshalJSON(data []byte) error {
204	value, err := proto.UnmarshalJSONEnum(HashScheme_value, data, "HashScheme")
205	if err != nil {
206		return err
207	}
208	*x = HashScheme(value)
209	return nil
210}
211
212// IndexInst message as payload between co-ordinator, projector, indexer.
213type IndexInst struct {
214	InstId           *uint64          `protobuf:"varint,1,req,name=instId" json:"instId,omitempty"`
215	State            *IndexState      `protobuf:"varint,2,req,name=state,enum=protobuf.IndexState" json:"state,omitempty"`
216	Definition       *IndexDefn       `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"`
217	Tp               *TestPartition   `protobuf:"bytes,4,opt,name=tp" json:"tp,omitempty"`
218	SinglePartn      *SinglePartition `protobuf:"bytes,5,opt,name=singlePartn" json:"singlePartn,omitempty"`
219	KeyPartn         *KeyPartition    `protobuf:"bytes,6,opt,name=keyPartn" json:"keyPartn,omitempty"`
220	XXX_unrecognized []byte           `json:"-"`
221}
222
223func (m *IndexInst) Reset()         { *m = IndexInst{} }
224func (m *IndexInst) String() string { return proto.CompactTextString(m) }
225func (*IndexInst) ProtoMessage()    {}
226
227func (m *IndexInst) GetInstId() uint64 {
228	if m != nil && m.InstId != nil {
229		return *m.InstId
230	}
231	return 0
232}
233
234func (m *IndexInst) GetState() IndexState {
235	if m != nil && m.State != nil {
236		return *m.State
237	}
238	return IndexState_IndexInitial
239}
240
241func (m *IndexInst) GetDefinition() *IndexDefn {
242	if m != nil {
243		return m.Definition
244	}
245	return nil
246}
247
248func (m *IndexInst) GetTp() *TestPartition {
249	if m != nil {
250		return m.Tp
251	}
252	return nil
253}
254
255func (m *IndexInst) GetSinglePartn() *SinglePartition {
256	if m != nil {
257		return m.SinglePartn
258	}
259	return nil
260}
261
262func (m *IndexInst) GetKeyPartn() *KeyPartition {
263	if m != nil {
264		return m.KeyPartn
265	}
266	return nil
267}
268
269// Index DDL from create index statement.
270type IndexDefn struct {
271	DefnID             *uint64          `protobuf:"varint,1,req,name=defnID" json:"defnID,omitempty"`
272	Bucket             *string          `protobuf:"bytes,2,req,name=bucket" json:"bucket,omitempty"`
273	IsPrimary          *bool            `protobuf:"varint,3,req,name=isPrimary" json:"isPrimary,omitempty"`
274	Name               *string          `protobuf:"bytes,4,req,name=name" json:"name,omitempty"`
275	Using              *StorageType     `protobuf:"varint,5,req,name=using,enum=protobuf.StorageType" json:"using,omitempty"`
276	ExprType           *ExprType        `protobuf:"varint,6,req,name=exprType,enum=protobuf.ExprType" json:"exprType,omitempty"`
277	SecExpressions     []string         `protobuf:"bytes,7,rep,name=secExpressions" json:"secExpressions,omitempty"`
278	PartitionScheme    *PartitionScheme `protobuf:"varint,8,opt,name=partitionScheme,enum=protobuf.PartitionScheme" json:"partitionScheme,omitempty"`
279	PartnExpression    *string          `protobuf:"bytes,9,opt,name=partnExpression" json:"partnExpression,omitempty"`
280	WhereExpression    *string          `protobuf:"bytes,10,opt,name=whereExpression" json:"whereExpression,omitempty"`
281	PartnExpressions   []string         `protobuf:"bytes,11,rep,name=partnExpressions" json:"partnExpressions,omitempty"`
282	RetainDeletedXATTR *bool            `protobuf:"varint,12,opt,name=retainDeletedXATTR" json:"retainDeletedXATTR,omitempty"`
283	HashScheme         *HashScheme      `protobuf:"varint,13,opt,name=hashScheme,enum=protobuf.HashScheme" json:"hashScheme,omitempty"`
284	XXX_unrecognized   []byte           `json:"-"`
285}
286
287func (m *IndexDefn) Reset()         { *m = IndexDefn{} }
288func (m *IndexDefn) String() string { return proto.CompactTextString(m) }
289func (*IndexDefn) ProtoMessage()    {}
290
291func (m *IndexDefn) GetDefnID() uint64 {
292	if m != nil && m.DefnID != nil {
293		return *m.DefnID
294	}
295	return 0
296}
297
298func (m *IndexDefn) GetBucket() string {
299	if m != nil && m.Bucket != nil {
300		return *m.Bucket
301	}
302	return ""
303}
304
305func (m *IndexDefn) GetIsPrimary() bool {
306	if m != nil && m.IsPrimary != nil {
307		return *m.IsPrimary
308	}
309	return false
310}
311
312func (m *IndexDefn) GetName() string {
313	if m != nil && m.Name != nil {
314		return *m.Name
315	}
316	return ""
317}
318
319func (m *IndexDefn) GetUsing() StorageType {
320	if m != nil && m.Using != nil {
321		return *m.Using
322	}
323	return StorageType_forestdb
324}
325
326func (m *IndexDefn) GetExprType() ExprType {
327	if m != nil && m.ExprType != nil {
328		return *m.ExprType
329	}
330	return ExprType_JAVASCRIPT
331}
332
333func (m *IndexDefn) GetSecExpressions() []string {
334	if m != nil {
335		return m.SecExpressions
336	}
337	return nil
338}
339
340func (m *IndexDefn) GetPartitionScheme() PartitionScheme {
341	if m != nil && m.PartitionScheme != nil {
342		return *m.PartitionScheme
343	}
344	return PartitionScheme_TEST
345}
346
347func (m *IndexDefn) GetPartnExpression() string {
348	if m != nil && m.PartnExpression != nil {
349		return *m.PartnExpression
350	}
351	return ""
352}
353
354func (m *IndexDefn) GetWhereExpression() string {
355	if m != nil && m.WhereExpression != nil {
356		return *m.WhereExpression
357	}
358	return ""
359}
360
361func (m *IndexDefn) GetPartnExpressions() []string {
362	if m != nil {
363		return m.PartnExpressions
364	}
365	return nil
366}
367
368func (m *IndexDefn) GetRetainDeletedXATTR() bool {
369	if m != nil && m.RetainDeletedXATTR != nil {
370		return *m.RetainDeletedXATTR
371	}
372	return false
373}
374
375func (m *IndexDefn) GetHashScheme() HashScheme {
376	if m != nil && m.HashScheme != nil {
377		return *m.HashScheme
378	}
379	return HashScheme_CRC32
380}
381
382func init() {
383	proto.RegisterEnum("protobuf.IndexState", IndexState_name, IndexState_value)
384	proto.RegisterEnum("protobuf.StorageType", StorageType_name, StorageType_value)
385	proto.RegisterEnum("protobuf.ExprType", ExprType_name, ExprType_value)
386	proto.RegisterEnum("protobuf.PartitionScheme", PartitionScheme_name, PartitionScheme_value)
387	proto.RegisterEnum("protobuf.HashScheme", HashScheme_name, HashScheme_value)
388}
389