1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/http_static.api.json
7 // Package http_static contains generated bindings for API file http_static.api.
15 api "git.fd.io/govpp.git/api"
16 codec "git.fd.io/govpp.git/codec"
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
26 APIFile = "http_static"
28 VersionCrc = 0xd29e72e9
31 // HTTPStaticEnable defines message 'http_static_enable'.
32 type HTTPStaticEnable struct {
33 FifoSize uint32 `binapi:"u32,name=fifo_size" json:"fifo_size,omitempty"`
34 CacheSizeLimit uint32 `binapi:"u32,name=cache_size_limit" json:"cache_size_limit,omitempty"`
35 PreallocFifos uint32 `binapi:"u32,name=prealloc_fifos" json:"prealloc_fifos,omitempty"`
36 PrivateSegmentSize uint32 `binapi:"u32,name=private_segment_size" json:"private_segment_size,omitempty"`
37 WwwRoot string `binapi:"string[256],name=www_root" json:"www_root,omitempty"`
38 URI string `binapi:"string[256],name=uri" json:"uri,omitempty"`
41 func (m *HTTPStaticEnable) Reset() { *m = HTTPStaticEnable{} }
42 func (*HTTPStaticEnable) GetMessageName() string { return "http_static_enable" }
43 func (*HTTPStaticEnable) GetCrcString() string { return "075f8292" }
44 func (*HTTPStaticEnable) GetMessageType() api.MessageType {
45 return api.RequestMessage
48 func (m *HTTPStaticEnable) Size() int {
53 size += 4 // m.FifoSize
54 size += 4 // m.CacheSizeLimit
55 size += 4 // m.PreallocFifos
56 size += 4 // m.PrivateSegmentSize
57 size += 256 // m.WwwRoot
61 func (m *HTTPStaticEnable) Marshal(b []byte) ([]byte, error) {
64 buf = codec.NewBuffer(make([]byte, m.Size()))
66 buf = codec.NewBuffer(b)
68 buf.EncodeUint32(uint32(m.FifoSize))
69 buf.EncodeUint32(uint32(m.CacheSizeLimit))
70 buf.EncodeUint32(uint32(m.PreallocFifos))
71 buf.EncodeUint32(uint32(m.PrivateSegmentSize))
72 buf.EncodeString(m.WwwRoot, 256)
73 buf.EncodeString(m.URI, 256)
74 return buf.Bytes(), nil
76 func (m *HTTPStaticEnable) Unmarshal(b []byte) error {
77 buf := codec.NewBuffer(b)
78 m.FifoSize = buf.DecodeUint32()
79 m.CacheSizeLimit = buf.DecodeUint32()
80 m.PreallocFifos = buf.DecodeUint32()
81 m.PrivateSegmentSize = buf.DecodeUint32()
82 m.WwwRoot = buf.DecodeString(256)
83 m.URI = buf.DecodeString(256)
87 // HTTPStaticEnableReply defines message 'http_static_enable_reply'.
88 type HTTPStaticEnableReply struct {
89 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
92 func (m *HTTPStaticEnableReply) Reset() { *m = HTTPStaticEnableReply{} }
93 func (*HTTPStaticEnableReply) GetMessageName() string { return "http_static_enable_reply" }
94 func (*HTTPStaticEnableReply) GetCrcString() string { return "e8d4e804" }
95 func (*HTTPStaticEnableReply) GetMessageType() api.MessageType {
96 return api.ReplyMessage
99 func (m *HTTPStaticEnableReply) Size() int {
104 size += 4 // m.Retval
107 func (m *HTTPStaticEnableReply) Marshal(b []byte) ([]byte, error) {
108 var buf *codec.Buffer
110 buf = codec.NewBuffer(make([]byte, m.Size()))
112 buf = codec.NewBuffer(b)
114 buf.EncodeUint32(uint32(m.Retval))
115 return buf.Bytes(), nil
117 func (m *HTTPStaticEnableReply) Unmarshal(b []byte) error {
118 buf := codec.NewBuffer(b)
119 m.Retval = int32(buf.DecodeUint32())
123 func init() { file_http_static_binapi_init() }
124 func file_http_static_binapi_init() {
125 api.RegisterMessage((*HTTPStaticEnable)(nil), "http_static_enable_075f8292")
126 api.RegisterMessage((*HTTPStaticEnableReply)(nil), "http_static_enable_reply_e8d4e804")
129 // Messages returns list of all messages in this module.
130 func AllMessages() []api.Message {
131 return []api.Message{
132 (*HTTPStaticEnable)(nil),
133 (*HTTPStaticEnableReply)(nil),