1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0
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() (size int) {
52 size += 4 // m.FifoSize
53 size += 4 // m.CacheSizeLimit
54 size += 4 // m.PreallocFifos
55 size += 4 // m.PrivateSegmentSize
56 size += 256 // m.WwwRoot
60 func (m *HTTPStaticEnable) Marshal(b []byte) ([]byte, error) {
62 b = make([]byte, m.Size())
64 buf := codec.NewBuffer(b)
65 buf.EncodeUint32(m.FifoSize)
66 buf.EncodeUint32(m.CacheSizeLimit)
67 buf.EncodeUint32(m.PreallocFifos)
68 buf.EncodeUint32(m.PrivateSegmentSize)
69 buf.EncodeString(m.WwwRoot, 256)
70 buf.EncodeString(m.URI, 256)
71 return buf.Bytes(), nil
73 func (m *HTTPStaticEnable) Unmarshal(b []byte) error {
74 buf := codec.NewBuffer(b)
75 m.FifoSize = buf.DecodeUint32()
76 m.CacheSizeLimit = buf.DecodeUint32()
77 m.PreallocFifos = buf.DecodeUint32()
78 m.PrivateSegmentSize = buf.DecodeUint32()
79 m.WwwRoot = buf.DecodeString(256)
80 m.URI = buf.DecodeString(256)
84 // HTTPStaticEnableReply defines message 'http_static_enable_reply'.
85 type HTTPStaticEnableReply struct {
86 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
89 func (m *HTTPStaticEnableReply) Reset() { *m = HTTPStaticEnableReply{} }
90 func (*HTTPStaticEnableReply) GetMessageName() string { return "http_static_enable_reply" }
91 func (*HTTPStaticEnableReply) GetCrcString() string { return "e8d4e804" }
92 func (*HTTPStaticEnableReply) GetMessageType() api.MessageType {
93 return api.ReplyMessage
96 func (m *HTTPStaticEnableReply) Size() (size int) {
100 size += 4 // m.Retval
103 func (m *HTTPStaticEnableReply) Marshal(b []byte) ([]byte, error) {
105 b = make([]byte, m.Size())
107 buf := codec.NewBuffer(b)
108 buf.EncodeInt32(m.Retval)
109 return buf.Bytes(), nil
111 func (m *HTTPStaticEnableReply) Unmarshal(b []byte) error {
112 buf := codec.NewBuffer(b)
113 m.Retval = buf.DecodeInt32()
117 func init() { file_http_static_binapi_init() }
118 func file_http_static_binapi_init() {
119 api.RegisterMessage((*HTTPStaticEnable)(nil), "http_static_enable_075f8292")
120 api.RegisterMessage((*HTTPStaticEnableReply)(nil), "http_static_enable_reply_e8d4e804")
123 // Messages returns list of all messages in this module.
124 func AllMessages() []api.Message {
125 return []api.Message{
126 (*HTTPStaticEnable)(nil),
127 (*HTTPStaticEnableReply)(nil),