summaryrefslogtreecommitdiffstats
path: root/binapi/pot/pot.ba.go
blob: f037a53a1d7c3ee9c59f3d12f5ee66d3c042e67b (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
//  binapi-generator: v0.4.0-dev
//  VPP:              20.05-release
// source: /usr/share/vpp/api/plugins/pot.api.json

// Package pot contains generated bindings for API file pot.api.
//
// Contents:
//   8 messages
//
package pot

import (
	api "git.fd.io/govpp.git/api"
	codec "git.fd.io/govpp.git/codec"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the GoVPP api package it is being compiled against.
// A compilation error at this line likely means your copy of the
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2

const (
	APIFile    = "pot"
	APIVersion = "1.0.0"
	VersionCrc = 0xa9d8e55c
)

// PotProfileActivate defines message 'pot_profile_activate'.
type PotProfileActivate struct {
	ID       uint8  `binapi:"u8,name=id" json:"id,omitempty"`
	ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
}

func (m *PotProfileActivate) Reset()               { *m = PotProfileActivate{} }
func (*PotProfileActivate) GetMessageName() string { return "pot_profile_activate" }
func (*PotProfileActivate) GetCrcString() string   { return "0770af98" }
func (*PotProfileActivate) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *PotProfileActivate) Size() int {
	if m == nil {
		return 0
	}
	var size int
	size += 1                   // m.ID
	size += 4 + len(m.ListName) // m.ListName
	return size
}
func (m *PotProfileActivate) Marshal(b []byte) ([]byte, error) {
	var buf *codec.Buffer
	if b == nil {
		buf = codec.NewBuffer(make([]byte, m.Size()))
	} else {
		buf = codec.NewBuffer(b)
	}
	buf.EncodeUint8(uint8(m.ID))
	buf.EncodeString(m.ListName, 0)
	return buf.Bytes(), nil
}
func (m *PotProfileActivate) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.ID = buf.DecodeUint8()
	m.ListName = buf.DecodeString(0)
	return nil
}

// PotProfileActivateReply defines message 'pot_profile_activate_reply'.
type PotProfileActivateReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

func (m *PotProfileActivateReply) Reset()               { *m = PotProfileActivateReply{} }
func (*PotProfileActivateReply) GetMessageName() string { return "pot_profile_activate_reply" }
func (*PotProfileActivateReply) GetCrcString() string   { return "e8d4e804" }
func (*PotProfileActivateReply) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *PotProfileActivateReply) Size() int {
	if m == nil {
		return 0
	}
	var size int
	size += 4 // m.Retval
	return size
}
func (m *PotProfileActivateReply) Marshal(b []byte) ([]byte, error) {
	var buf *codec.Buffer
	if b == nil {
		buf = codec.NewBuffer(make([]byte, m.Size()))
	} else {
		buf = codec.NewBuffer(b)
	}
	buf.EncodeUint32(uint32(m.Retval))
	return buf.Bytes(), nil
}
func (m *PotProfileActivateReply) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Retval = int32(buf.DecodeUint32())
	return nil
}

// PotProfileAdd defines message 'pot_profile_add'.
type PotProfileAdd struct {
	ID               uint8  `binapi:"u8,name=id" json:"id,omitempty"`
	Validator        uint8  `binapi:"u8,name=validator" json:"validator,omitempty"`
	SecretKey        uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
	SecretShare      uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
	Prime            uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
	MaxBits          uint8  `binapi:"u8,name=max_bits" json:"max_bits,omitempty"`
	Lpc              uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
	PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
	ListName         string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
}

func (m *PotProfileAdd) Reset()               { *m = PotProfileAdd{} }
func (*PotProfileAdd) GetMessageName() string { return "pot_profile_add" }
func (*PotProfileAdd) GetCrcString() string   { return "ad5da3a3" }
func (*PotProfileAdd) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *PotProfileAdd) Size() int {
	if m == nil {
		return 0
	}
	var size int
	size += 1                   // m.ID
	size += 1                   // m.Validator
	size += 8                   // m.SecretKey
	size += 8                   // m.SecretShare
	size += 8                   // m.Prime
	size += 1                   // m.MaxBits
	size += 8                   // m.Lpc
	size += 8                   // m.PolynomialPublic
	size += 4 + len(m.ListName) // m.ListName
	return size
}
func (m *PotProfileAdd) Marshal(b []byte) ([]byte, error) {
	var buf *codec.Buffer
	if b == nil {
		buf = codec.NewBuffer(make([]byte, m.Size()))
	} else {
		buf = codec.NewBuffer(b)
	}
	buf.EncodeUint8(uint8(m.ID))
	buf.EncodeUint8(uint8(m.Validator))
	buf.EncodeUint64(uint64(m.SecretKey))
	buf.EncodeUint64(uint64(m.SecretShare))
	buf.EncodeUint64(uint64(m.Prime))
	buf.EncodeUint8(uint8(m.MaxBits))
	buf.EncodeUint64(uint64(m.Lpc))
	buf.EncodeUint64(uint64(m.PolynomialPublic))
	buf.EncodeString(m.ListName, 0)
	return buf.Bytes(), nil
}
func (m *PotProfileAdd) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.ID = buf.DecodeUint8()
	m.Validator = buf.DecodeUint8()
	m.SecretKey = buf.DecodeUint64()
	m.SecretShare = buf.DecodeUint64()
	m.Prime = buf.DecodeUint64()
	m.MaxBits = buf.DecodeUint8()
	m.Lpc = buf.DecodeUint64()
	m.PolynomialPublic = buf.DecodeUint64()
	m.ListName = buf.DecodeString(0)
	return nil
}

// PotProfileAddReply defines message 'pot_profile_add_reply'.
type PotProfileAddReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

func (m *PotProfileAddReply) Reset()               { *m = PotProfileAddReply{} }
func (*PotProfileAddReply) GetMessageName() string { return "pot_profile_add_reply" }
func (*PotProfileAddReply) GetCrcString() string   { return "e8d4e804" }
func (*PotProfileAddReply) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *PotProfileAddReply) Size() int {
	if m == nil {
		return 0
	}
	var size int
	size += 4 // m.Retval
	return size
}
func (m *PotProfileAddReply) Marshal(b []byte) ([]byte, error) {
	var buf *codec.Buffer
	if b == nil {
		buf = codec.NewBuffer(make([]byte, m.Size()))
	} else {
		buf = codec.NewBuffer(b)
	}
	buf.EncodeUint32(uint32(m.Retval))
	return buf.Bytes(), nil
}
func (m *PotProfileAddReply) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Retval = int32(buf.DecodeUint32())
	return nil
}

// PotProfileDel defines message 'pot_profile_del'.
type PotProfileDel struct {
	ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
}

func (m *PotProfileDel) Reset()               { *m = PotProfileDel{} }
func (*PotProfileDel) GetMessageName() string { return "pot_profile_del" }
func (*PotProfileDel) GetCrcString() string   { return "cd63f53b" }
func (*PotProfileDel) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *PotProfileDel) Size() int {
	if m == nil {
		return 0
	}
	var size int
	size += 4 + len(m.ListName) // m.ListName
	return size
}
func (m *PotProfileDel) Marshal(b []byte) ([]byte, error) {
	var buf *codec.Buffer
	if b == nil {
		buf = codec.NewBuffer(make([]byte, m.Size()))
	} else {
		buf = codec.NewBuffer(b)
	}
	buf.EncodeString(m.ListName, 0)
	return buf.Bytes(), nil
}
func (m *PotProfileDel) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.ListName = buf.DecodeString(0)
	return nil
}

// PotProfileDelReply defines message 'pot_profile_del_reply'.
type PotProfileDelReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

func (m *PotProfileDelReply) Reset()               { *m = PotProfileDelReply{} }
func (*PotProfileDelReply) GetMessageName() string { return "pot_profile_del_reply" }
func (*PotProfileDelReply) GetCrcString() string   { return "e8d4e804" }
func (*PotProfileDelReply) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *PotProfileDelReply) Size() int {
	if m == nil {
		return 0
	}
	var size int
	size += 4 // m.Retval
	return size
}
func (m *PotProfileDelReply) Marshal(b []byte) ([]byte, error) {
	var buf *codec.Buffer
	if b == nil {
		buf = codec.NewBuffer(make([]byte, m.Size()))
	} else {
		buf = codec.NewBuffer(b)
	}
	buf.EncodeUint32(uint32(m.Retval))
	return buf.Bytes(), nil
}
func (m *PotProfileDelReply) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Retval = int32(buf.DecodeUint32())
	return nil
}

// PotProfileShowConfigDetails defines message 'pot_profile_show_config_details'.
type PotProfileShowConfigDetails struct {
	Retval           int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
	ID               uint8  `binapi:"u8,name=id" json:"id,omitempty"`
	Validator        uint8  `binapi:"u8,name=validator" json:"validator,omitempty"`
	SecretKey        uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
	SecretShare      uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
	Prime            uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
	BitMask          uint64 `binapi:"u64,name=bit_mask" json:"bit_mask,omitempty"`
	Lpc              uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
	PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
}

func (m *PotProfileShowConfigDetails) Reset()               { *m = PotProfileShowConfigDetails{} }
func (*PotProfileShowConfigDetails) GetMessageName() string { return "pot_profile_show_config_details" }
func (*PotProfileShowConfigDetails) GetCrcString() string   { return "b7ce0618" }
func (*PotProfileShowConfigDetails) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *PotProfileShowConfigDetails) Size() int {
	if m == nil {
		return 0
	}
	var size int
	size += 4 // m.Retval
	size += 1 // m.ID
	size += 1 // m.Validator
	size += 8 // m.SecretKey
	size += 8 // m.SecretShare
	size += 8 // m.Prime
	size += 8 // m.BitMask
	size += 8 // m.Lpc
	size += 8 // m.PolynomialPublic
	return size
}
func (m *PotProfileShowConfigDetails) Marshal(b []byte) ([]byte, error) {
	var buf *codec.Buffer
	if b == nil {
		buf = codec.NewBuffer(make([]byte, m.Size()))
	} else {
		buf = codec.NewBuffer(b)
	}
	buf.EncodeUint32(uint32(m.Retval))
	buf.EncodeUint8(uint8(m.ID))
	buf.EncodeUint8(uint8(m.Validator))
	buf.EncodeUint64(uint64(m.SecretKey))
	buf.EncodeUint64(uint64(m.SecretShare))
	buf.EncodeUint64(uint64(m.Prime))
	buf.EncodeUint64(uint64(m.BitMask))
	buf.EncodeUint64(uint64(m.Lpc))
	buf.EncodeUint64(uint64(m.PolynomialPublic))
	return buf.Bytes(), nil
}
func (m *PotProfileShowConfigDetails) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Retval = int32(buf.DecodeUint32())
	m.ID = buf.DecodeUint8()
	m.Validator = buf.DecodeUint8()
	m.SecretKey = buf.DecodeUint64()
	m.SecretShare = buf.DecodeUint64()
	m.Prime = buf.DecodeUint64()
	m.BitMask = buf.DecodeUint64()
	m.Lpc = buf.DecodeUint64()
	m.PolynomialPublic = buf.DecodeUint64()
	return nil
}

// PotProfileShowConfigDump defines message 'pot_profile_show_config_dump'.
type PotProfileShowConfigDump struct {
	ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
}

func (m *PotProfileShowConfigDump) Reset()               { *m = PotProfileShowConfigDump{} }
func (*PotProfileShowConfigDump) GetMessageName() string { return "pot_profile_show_config_dump" }
func (*PotProfileShowConfigDump) GetCrcString() string   { return "005b7d59" }
func (*PotProfileShowConfigDump) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *PotProfileShowConfigDump) Size() int {
	if m == nil {
		return 0
	}
	var size int
	size += 1 // m.ID
	return size
}
func (m *PotProfileShowConfigDump) Marshal(b []byte) ([]byte, error) {
	var buf *codec.Buffer
	if b == nil {
		buf = codec.NewBuffer(make([]byte, m.Size()))
	} else {
		buf = codec.NewBuffer(b)
	}
	buf.EncodeUint8(uint8(m.ID))
	return buf.Bytes(), nil
}
func (m *PotProfileShowConfigDump) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.ID = buf.DecodeUint8()
	return nil
}

func init() { file_pot_binapi_init() }
func file_pot_binapi_init() {
	api.RegisterMessage((*PotProfileActivate)(nil), "pot_profile_activate_0770af98")
	api.RegisterMessage((*PotProfileActivateReply)(nil), "pot_profile_activate_reply_e8d4e804")
	api.RegisterMessage((*PotProfileAdd)(nil), "pot_profile_add_ad5da3a3")
	api.RegisterMessage((*PotProfileAddReply)(nil), "pot_profile_add_reply_e8d4e804")
	api.RegisterMessage((*PotProfileDel)(nil), "pot_profile_del_cd63f53b")
	api.RegisterMessage((*PotProfileDelReply)(nil), "pot_profile_del_reply_e8d4e804")
	api.RegisterMessage((*PotProfileShowConfigDetails)(nil), "pot_profile_show_config_details_b7ce0618")
	api.RegisterMessage((*PotProfileShowConfigDump)(nil), "pot_profile_show_config_dump_005b7d59")
}

// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
	return []api.Message{
		(*PotProfileActivate)(nil),
		(*PotProfileActivateReply)(nil),
		(*PotProfileAdd)(nil),
		(*PotProfileAddReply)(nil),
		(*PotProfileDel)(nil),
		(*PotProfileDelReply)(nil),
		(*PotProfileShowConfigDetails)(nil),
		(*PotProfileShowConfigDump)(nil),
	}
}