1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package http_static contains generated bindings for API file http_static.api.
14 api "git.fd.io/govpp.git/api"
15 codec "git.fd.io/govpp.git/codec"
18 // This is a compile-time assertion to ensure that this generated file
19 // is compatible with the GoVPP api package it is being compiled against.
20 // A compilation error at this line likely means your copy of the
21 // GoVPP api package needs to be updated.
22 const _ = api.GoVppAPIPackageIsVersion2
25 APIFile = "http_static"
27 VersionCrc = 0xd29e72e9
30 // HTTPStaticEnable defines message 'http_static_enable'.
31 type HTTPStaticEnable struct {
32 FifoSize uint32 `binapi:"u32,name=fifo_size" json:"fifo_size,omitempty"`
33 CacheSizeLimit uint32 `binapi:"u32,name=cache_size_limit" json:"cache_size_limit,omitempty"`
34 PreallocFifos uint32 `binapi:"u32,name=prealloc_fifos" json:"prealloc_fifos,omitempty"`
35 PrivateSegmentSize uint32 `binapi:"u32,name=private_segment_size" json:"private_segment_size,omitempty"`
36 WwwRoot string `binapi:"string[256],name=www_root" json:"www_root,omitempty"`
37 URI string `binapi:"string[256],name=uri" json:"uri,omitempty"`
40 func (m *HTTPStaticEnable) Reset() { *m = HTTPStaticEnable{} }
41 func (*HTTPStaticEnable) GetMessageName() string { return "http_static_enable" }
42 func (*HTTPStaticEnable) GetCrcString() string { return "075f8292" }
43 func (*HTTPStaticEnable) GetMessageType() api.MessageType {
44 return api.RequestMessage
47 func (m *HTTPStaticEnable) Size() (size int) {
51 size += 4 // m.FifoSize
52 size += 4 // m.CacheSizeLimit
53 size += 4 // m.PreallocFifos
54 size += 4 // m.PrivateSegmentSize
55 size += 256 // m.WwwRoot
59 func (m *HTTPStaticEnable) Marshal(b []byte) ([]byte, error) {
61 b = make([]byte, m.Size())
63 buf := codec.NewBuffer(b)
64 buf.EncodeUint32(m.FifoSize)
65 buf.EncodeUint32(m.CacheSizeLimit)
66 buf.EncodeUint32(m.PreallocFifos)
67 buf.EncodeUint32(m.PrivateSegmentSize)
68 buf.EncodeString(m.WwwRoot, 256)
69 buf.EncodeString(m.URI, 256)
70 return buf.Bytes(), nil
72 func (m *HTTPStaticEnable) Unmarshal(b []byte) error {
73 buf := codec.NewBuffer(b)
74 m.FifoSize = buf.DecodeUint32()
75 m.CacheSizeLimit = buf.DecodeUint32()
76 m.PreallocFifos = buf.DecodeUint32()
77 m.PrivateSegmentSize = buf.DecodeUint32()
78 m.WwwRoot = buf.DecodeString(256)
79 m.URI = buf.DecodeString(256)
83 // HTTPStaticEnableReply defines message 'http_static_enable_reply'.
84 type HTTPStaticEnableReply struct {
85 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
88 func (m *HTTPStaticEnableReply) Reset() { *m = HTTPStaticEnableReply{} }
89 func (*HTTPStaticEnableReply) GetMessageName() string { return "http_static_enable_reply" }
90 func (*HTTPStaticEnableReply) GetCrcString() string { return "e8d4e804" }
91 func (*HTTPStaticEnableReply) GetMessageType() api.MessageType {
92 return api.ReplyMessage
95 func (m *HTTPStaticEnableReply) Size() (size int) {
102 func (m *HTTPStaticEnableReply) Marshal(b []byte) ([]byte, error) {
104 b = make([]byte, m.Size())
106 buf := codec.NewBuffer(b)
107 buf.EncodeInt32(m.Retval)
108 return buf.Bytes(), nil
110 func (m *HTTPStaticEnableReply) Unmarshal(b []byte) error {
111 buf := codec.NewBuffer(b)
112 m.Retval = buf.DecodeInt32()
116 func init() { file_http_static_binapi_init() }
117 func file_http_static_binapi_init() {
118 api.RegisterMessage((*HTTPStaticEnable)(nil), "http_static_enable_075f8292")
119 api.RegisterMessage((*HTTPStaticEnableReply)(nil), "http_static_enable_reply_e8d4e804")
122 // Messages returns list of all messages in this module.
123 func AllMessages() []api.Message {
124 return []api.Message{
125 (*HTTPStaticEnable)(nil),
126 (*HTTPStaticEnableReply)(nil),