@@ -73,7 +73,7 @@ const (
73
73
)
74
74
75
75
// parsePackage parses provided JSON data into objects prepared for code generation
76
- func parsePackage (ctx * context , jsonRoot * jsongo.JSONNode ) (* Package , error ) {
76
+ func parsePackage (ctx * context , jsonRoot * jsongo.Node ) (* Package , error ) {
77
77
pkg := Package {
78
78
Name : ctx .packageName ,
79
79
RefMap : make (map [string ]string ),
@@ -241,7 +241,7 @@ func parsePackage(ctx *context, jsonRoot *jsongo.JSONNode) (*Package, error) {
241
241
}
242
242
243
243
// parseEnum parses VPP binary API enum object from JSON node
244
- func parseEnum (ctx * context , enumNode * jsongo.JSONNode ) (* Enum , error ) {
244
+ func parseEnum (ctx * context , enumNode * jsongo.Node ) (* Enum , error ) {
245
245
if enumNode .Len () == 0 || enumNode .At (0 ).GetType () != jsongo .TypeValue {
246
246
return nil , errors .New ("invalid JSON for enum specified" )
247
247
}
@@ -286,7 +286,7 @@ func parseEnum(ctx *context, enumNode *jsongo.JSONNode) (*Enum, error) {
286
286
}
287
287
288
288
// parseUnion parses VPP binary API union object from JSON node
289
- func parseUnion (ctx * context , unionNode * jsongo.JSONNode ) (* Union , error ) {
289
+ func parseUnion (ctx * context , unionNode * jsongo.Node ) (* Union , error ) {
290
290
if unionNode .Len () == 0 || unionNode .At (0 ).GetType () != jsongo .TypeValue {
291
291
return nil , errors .New ("invalid JSON for union specified" )
292
292
}
@@ -323,7 +323,7 @@ func parseUnion(ctx *context, unionNode *jsongo.JSONNode) (*Union, error) {
323
323
}
324
324
325
325
// parseType parses VPP binary API type object from JSON node
326
- func parseType (ctx * context , typeNode * jsongo.JSONNode ) (* Type , error ) {
326
+ func parseType (ctx * context , typeNode * jsongo.Node ) (* Type , error ) {
327
327
if typeNode .Len () == 0 || typeNode .At (0 ).GetType () != jsongo .TypeValue {
328
328
return nil , errors .New ("invalid JSON for type specified" )
329
329
}
@@ -360,7 +360,7 @@ func parseType(ctx *context, typeNode *jsongo.JSONNode) (*Type, error) {
360
360
}
361
361
362
362
// parseAlias parses VPP binary API alias object from JSON node
363
- func parseAlias (ctx * context , aliasName string , aliasNode * jsongo.JSONNode ) (* Alias , error ) {
363
+ func parseAlias (ctx * context , aliasName string , aliasNode * jsongo.Node ) (* Alias , error ) {
364
364
if aliasNode .Len () == 0 || aliasNode .At (aliasTypeField ).GetType () != jsongo .TypeValue {
365
365
return nil , errors .New ("invalid JSON for alias specified" )
366
366
}
@@ -391,7 +391,7 @@ func parseAlias(ctx *context, aliasName string, aliasNode *jsongo.JSONNode) (*Al
391
391
}
392
392
393
393
// parseMessage parses VPP binary API message object from JSON node
394
- func parseMessage (ctx * context , msgNode * jsongo.JSONNode ) (* Message , error ) {
394
+ func parseMessage (ctx * context , msgNode * jsongo.Node ) (* Message , error ) {
395
395
if msgNode .Len () == 0 || msgNode .At (0 ).GetType () != jsongo .TypeValue {
396
396
return nil , errors .New ("invalid JSON for message specified" )
397
397
}
@@ -429,7 +429,7 @@ func parseMessage(ctx *context, msgNode *jsongo.JSONNode) (*Message, error) {
429
429
}
430
430
431
431
// parseField parses VPP binary API object field from JSON node
432
- func parseField (ctx * context , field * jsongo.JSONNode ) (* Field , error ) {
432
+ func parseField (ctx * context , field * jsongo.Node ) (* Field , error ) {
433
433
if field .Len () < 2 || field .At (0 ).GetType () != jsongo .TypeValue || field .At (1 ).GetType () != jsongo .TypeValue {
434
434
return nil , errors .New ("invalid JSON for field specified" )
435
435
}
@@ -489,7 +489,7 @@ func parseField(ctx *context, field *jsongo.JSONNode) (*Field, error) {
489
489
}
490
490
491
491
// parseService parses VPP binary API service object from JSON node
492
- func parseService (ctx * context , svcName string , svcNode * jsongo.JSONNode ) (* Service , error ) {
492
+ func parseService (ctx * context , svcName string , svcNode * jsongo.Node ) (* Service , error ) {
493
493
if svcNode .Len () == 0 || svcNode .At (replyField ).GetType () != jsongo .TypeValue {
494
494
return nil , errors .New ("invalid JSON for service specified" )
495
495
}
0 commit comments