dbe81e0402ed75270a1a98f2611cb35f60e47ba3
[govpp.git] / examples / binapi / vpe_types / vpe_types.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // source: /usr/share/vpp/api/core/vpe_types.api.json
3
4 /*
5 Package vpe_types is a generated VPP binary API for 'vpe_types' module.
6
7 It consists of:
8           1 enum
9           2 aliases
10           1 type
11 */
12 package vpe_types
13
14 import (
15         "bytes"
16         "context"
17         "io"
18         "strconv"
19
20         api "git.fd.io/govpp.git/api"
21         struc "github.com/lunixbochs/struc"
22 )
23
24 const (
25         // ModuleName is the name of this module.
26         ModuleName = "vpe_types"
27         // VersionCrc is the CRC of this module.
28         VersionCrc = 0x3369988d
29 )
30
31 // LogLevel represents VPP binary API enum 'log_level'.
32 type LogLevel uint32
33
34 const (
35         VPE_API_LOG_LEVEL_EMERG    LogLevel = 0
36         VPE_API_LOG_LEVEL_ALERT    LogLevel = 1
37         VPE_API_LOG_LEVEL_CRIT     LogLevel = 2
38         VPE_API_LOG_LEVEL_ERR      LogLevel = 3
39         VPE_API_LOG_LEVEL_WARNING  LogLevel = 4
40         VPE_API_LOG_LEVEL_NOTICE   LogLevel = 5
41         VPE_API_LOG_LEVEL_INFO     LogLevel = 6
42         VPE_API_LOG_LEVEL_DEBUG    LogLevel = 7
43         VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
44 )
45
46 var LogLevel_name = map[uint32]string{
47         0: "VPE_API_LOG_LEVEL_EMERG",
48         1: "VPE_API_LOG_LEVEL_ALERT",
49         2: "VPE_API_LOG_LEVEL_CRIT",
50         3: "VPE_API_LOG_LEVEL_ERR",
51         4: "VPE_API_LOG_LEVEL_WARNING",
52         5: "VPE_API_LOG_LEVEL_NOTICE",
53         6: "VPE_API_LOG_LEVEL_INFO",
54         7: "VPE_API_LOG_LEVEL_DEBUG",
55         8: "VPE_API_LOG_LEVEL_DISABLED",
56 }
57
58 var LogLevel_value = map[string]uint32{
59         "VPE_API_LOG_LEVEL_EMERG":    0,
60         "VPE_API_LOG_LEVEL_ALERT":    1,
61         "VPE_API_LOG_LEVEL_CRIT":     2,
62         "VPE_API_LOG_LEVEL_ERR":      3,
63         "VPE_API_LOG_LEVEL_WARNING":  4,
64         "VPE_API_LOG_LEVEL_NOTICE":   5,
65         "VPE_API_LOG_LEVEL_INFO":     6,
66         "VPE_API_LOG_LEVEL_DEBUG":    7,
67         "VPE_API_LOG_LEVEL_DISABLED": 8,
68 }
69
70 func (x LogLevel) String() string {
71         s, ok := LogLevel_name[uint32(x)]
72         if ok {
73                 return s
74         }
75         return strconv.Itoa(int(x))
76 }
77
78 // Timedelta represents VPP binary API alias 'timedelta'.
79 type Timedelta float64
80
81 // Timestamp represents VPP binary API alias 'timestamp'.
82 type Timestamp float64
83
84 // Version represents VPP binary API type 'version'.
85 type Version struct {
86         Major         uint32
87         Minor         uint32
88         Patch         uint32
89         PreRelease    []byte `struc:"[17]byte"`
90         BuildMetadata []byte `struc:"[17]byte"`
91 }
92
93 func (*Version) GetTypeName() string { return "version" }
94
95 // This is a compile-time assertion to ensure that this generated file
96 // is compatible with the GoVPP api package it is being compiled against.
97 // A compilation error at this line likely means your copy of the
98 // GoVPP api package needs to be updated.
99 const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
100
101 // Reference imports to suppress errors if they are not otherwise used.
102 var _ = api.RegisterMessage
103 var _ = bytes.NewBuffer
104 var _ = context.Background
105 var _ = io.Copy
106 var _ = strconv.Itoa
107 var _ = struc.Pack