aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/vpe_types/vpe_types.ba.go
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2020-07-17 10:36:28 +0200
committerOndrej Fabry <ofabry@cisco.com>2020-07-17 11:43:41 +0200
commitd1f24d37bd447b64e402298bb8eb2479681facf9 (patch)
treea3fc21ba730a91d8a402c7a5bf9c614e3677c4fc /binapi/vpe_types/vpe_types.ba.go
parent1548c7e12531e3d055567d761c580a1c7ff0ac40 (diff)
Improve binapi generator
- simplified Size/Marshal/Unmarshal methods - replace struc in unions with custom marshal/unmarshal - fix imports in generated files - fix mock adapter - generate rpc service using low-level stream API (dumps generate control ping or stream msg..) - move examples/binapi to binapi and generate all API for latest release - add binapigen.Plugin for developing custom generator plugins - optionally generate HTTP handlers (REST API) for RPC services - add govpp program for browsing VPP API Change-Id: I092e9ed2b0c17972b3476463c3d4b14dd76ed42b Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'binapi/vpe_types/vpe_types.ba.go')
-rw-r--r--binapi/vpe_types/vpe_types.ba.go88
1 files changed, 88 insertions, 0 deletions
diff --git a/binapi/vpe_types/vpe_types.ba.go b/binapi/vpe_types/vpe_types.ba.go
new file mode 100644
index 0000000..538b497
--- /dev/null
+++ b/binapi/vpe_types/vpe_types.ba.go
@@ -0,0 +1,88 @@
+// 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/core/vpe_types.api.json
+
+// Package vpe_types contains generated bindings for API file vpe_types.api.
+//
+// Contents:
+// 2 aliases
+// 1 enum
+// 1 struct
+//
+package vpe_types
+
+import (
+ api "git.fd.io/govpp.git/api"
+ "strconv"
+)
+
+// 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
+
+// LogLevel defines enum 'log_level'.
+type LogLevel uint32
+
+const (
+ VPE_API_LOG_LEVEL_EMERG LogLevel = 0
+ VPE_API_LOG_LEVEL_ALERT LogLevel = 1
+ VPE_API_LOG_LEVEL_CRIT LogLevel = 2
+ VPE_API_LOG_LEVEL_ERR LogLevel = 3
+ VPE_API_LOG_LEVEL_WARNING LogLevel = 4
+ VPE_API_LOG_LEVEL_NOTICE LogLevel = 5
+ VPE_API_LOG_LEVEL_INFO LogLevel = 6
+ VPE_API_LOG_LEVEL_DEBUG LogLevel = 7
+ VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
+)
+
+var (
+ LogLevel_name = map[uint32]string{
+ 0: "VPE_API_LOG_LEVEL_EMERG",
+ 1: "VPE_API_LOG_LEVEL_ALERT",
+ 2: "VPE_API_LOG_LEVEL_CRIT",
+ 3: "VPE_API_LOG_LEVEL_ERR",
+ 4: "VPE_API_LOG_LEVEL_WARNING",
+ 5: "VPE_API_LOG_LEVEL_NOTICE",
+ 6: "VPE_API_LOG_LEVEL_INFO",
+ 7: "VPE_API_LOG_LEVEL_DEBUG",
+ 8: "VPE_API_LOG_LEVEL_DISABLED",
+ }
+ LogLevel_value = map[string]uint32{
+ "VPE_API_LOG_LEVEL_EMERG": 0,
+ "VPE_API_LOG_LEVEL_ALERT": 1,
+ "VPE_API_LOG_LEVEL_CRIT": 2,
+ "VPE_API_LOG_LEVEL_ERR": 3,
+ "VPE_API_LOG_LEVEL_WARNING": 4,
+ "VPE_API_LOG_LEVEL_NOTICE": 5,
+ "VPE_API_LOG_LEVEL_INFO": 6,
+ "VPE_API_LOG_LEVEL_DEBUG": 7,
+ "VPE_API_LOG_LEVEL_DISABLED": 8,
+ }
+)
+
+func (x LogLevel) String() string {
+ s, ok := LogLevel_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "LogLevel(" + strconv.Itoa(int(x)) + ")"
+}
+
+// Timedelta defines alias 'timedelta'.
+type Timedelta float64
+
+// Timestamp defines alias 'timestamp'.
+type Timestamp float64
+
+// Version defines type 'version'.
+type Version struct {
+ Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
+ Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
+ Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
+ PreRelease []byte `binapi:"u8[17],name=pre_release" json:"pre_release,omitempty"`
+ BuildMetadata []byte `binapi:"u8[17],name=build_metadata" json:"build_metadata,omitempty"`
+}