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