8b8f318b59127de66a2724f0a3abe63945ce81a0
[govpp.git] / binapi / tls_openssl / tls_openssl.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 tls_openssl contains generated bindings for API file tls_openssl.api.
7 //
8 // Contents:
9 //   2 messages
10 //
11 package tls_openssl
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    = "tls_openssl"
26         APIVersion = "2.0.0"
27         VersionCrc = 0x7386fbcd
28 )
29
30 // TLSOpensslSetEngine defines message 'tls_openssl_set_engine'.
31 type TLSOpensslSetEngine struct {
32         AsyncEnable uint32 `binapi:"u32,name=async_enable" json:"async_enable,omitempty"`
33         Engine      []byte `binapi:"u8[64],name=engine" json:"engine,omitempty"`
34         Algorithm   []byte `binapi:"u8[64],name=algorithm" json:"algorithm,omitempty"`
35         Ciphers     []byte `binapi:"u8[64],name=ciphers" json:"ciphers,omitempty"`
36 }
37
38 func (m *TLSOpensslSetEngine) Reset()               { *m = TLSOpensslSetEngine{} }
39 func (*TLSOpensslSetEngine) GetMessageName() string { return "tls_openssl_set_engine" }
40 func (*TLSOpensslSetEngine) GetCrcString() string   { return "e34d95c1" }
41 func (*TLSOpensslSetEngine) GetMessageType() api.MessageType {
42         return api.RequestMessage
43 }
44
45 func (m *TLSOpensslSetEngine) Size() (size int) {
46         if m == nil {
47                 return 0
48         }
49         size += 4      // m.AsyncEnable
50         size += 1 * 64 // m.Engine
51         size += 1 * 64 // m.Algorithm
52         size += 1 * 64 // m.Ciphers
53         return size
54 }
55 func (m *TLSOpensslSetEngine) Marshal(b []byte) ([]byte, error) {
56         if b == nil {
57                 b = make([]byte, m.Size())
58         }
59         buf := codec.NewBuffer(b)
60         buf.EncodeUint32(m.AsyncEnable)
61         buf.EncodeBytes(m.Engine, 64)
62         buf.EncodeBytes(m.Algorithm, 64)
63         buf.EncodeBytes(m.Ciphers, 64)
64         return buf.Bytes(), nil
65 }
66 func (m *TLSOpensslSetEngine) Unmarshal(b []byte) error {
67         buf := codec.NewBuffer(b)
68         m.AsyncEnable = buf.DecodeUint32()
69         m.Engine = make([]byte, 64)
70         copy(m.Engine, buf.DecodeBytes(len(m.Engine)))
71         m.Algorithm = make([]byte, 64)
72         copy(m.Algorithm, buf.DecodeBytes(len(m.Algorithm)))
73         m.Ciphers = make([]byte, 64)
74         copy(m.Ciphers, buf.DecodeBytes(len(m.Ciphers)))
75         return nil
76 }
77
78 // TLSOpensslSetEngineReply defines message 'tls_openssl_set_engine_reply'.
79 type TLSOpensslSetEngineReply struct {
80         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
81 }
82
83 func (m *TLSOpensslSetEngineReply) Reset()               { *m = TLSOpensslSetEngineReply{} }
84 func (*TLSOpensslSetEngineReply) GetMessageName() string { return "tls_openssl_set_engine_reply" }
85 func (*TLSOpensslSetEngineReply) GetCrcString() string   { return "e8d4e804" }
86 func (*TLSOpensslSetEngineReply) GetMessageType() api.MessageType {
87         return api.ReplyMessage
88 }
89
90 func (m *TLSOpensslSetEngineReply) Size() (size int) {
91         if m == nil {
92                 return 0
93         }
94         size += 4 // m.Retval
95         return size
96 }
97 func (m *TLSOpensslSetEngineReply) Marshal(b []byte) ([]byte, error) {
98         if b == nil {
99                 b = make([]byte, m.Size())
100         }
101         buf := codec.NewBuffer(b)
102         buf.EncodeInt32(m.Retval)
103         return buf.Bytes(), nil
104 }
105 func (m *TLSOpensslSetEngineReply) Unmarshal(b []byte) error {
106         buf := codec.NewBuffer(b)
107         m.Retval = buf.DecodeInt32()
108         return nil
109 }
110
111 func init() { file_tls_openssl_binapi_init() }
112 func file_tls_openssl_binapi_init() {
113         api.RegisterMessage((*TLSOpensslSetEngine)(nil), "tls_openssl_set_engine_e34d95c1")
114         api.RegisterMessage((*TLSOpensslSetEngineReply)(nil), "tls_openssl_set_engine_reply_e8d4e804")
115 }
116
117 // Messages returns list of all messages in this module.
118 func AllMessages() []api.Message {
119         return []api.Message{
120                 (*TLSOpensslSetEngine)(nil),
121                 (*TLSOpensslSetEngineReply)(nil),
122         }
123 }