5f6397b63ac431dee8be86235c107b3b00d04903
[govpp.git] / binapi / http_static / http_static.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package http_static contains generated bindings for API file http_static.api.
7 //
8 // Contents:
9 //   2 messages
10 //
11 package http_static
12
13 import (
14         api "git.fd.io/govpp.git/api"
15         codec "git.fd.io/govpp.git/codec"
16 )
17
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
23
24 const (
25         APIFile    = "http_static"
26         APIVersion = "2.1.0"
27         VersionCrc = 0xd29e72e9
28 )
29
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"`
38 }
39
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
45 }
46
47 func (m *HTTPStaticEnable) Size() (size int) {
48         if m == nil {
49                 return 0
50         }
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
56         size += 256 // m.URI
57         return size
58 }
59 func (m *HTTPStaticEnable) Marshal(b []byte) ([]byte, error) {
60         if b == nil {
61                 b = make([]byte, m.Size())
62         }
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
71 }
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)
80         return nil
81 }
82
83 // HTTPStaticEnableReply defines message 'http_static_enable_reply'.
84 type HTTPStaticEnableReply struct {
85         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
86 }
87
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
93 }
94
95 func (m *HTTPStaticEnableReply) Size() (size int) {
96         if m == nil {
97                 return 0
98         }
99         size += 4 // m.Retval
100         return size
101 }
102 func (m *HTTPStaticEnableReply) Marshal(b []byte) ([]byte, error) {
103         if b == nil {
104                 b = make([]byte, m.Size())
105         }
106         buf := codec.NewBuffer(b)
107         buf.EncodeInt32(m.Retval)
108         return buf.Bytes(), nil
109 }
110 func (m *HTTPStaticEnableReply) Unmarshal(b []byte) error {
111         buf := codec.NewBuffer(b)
112         m.Retval = buf.DecodeInt32()
113         return nil
114 }
115
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")
120 }
121
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),
127         }
128 }