github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/pot/pot.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  // versions:
     3  //  binapi-generator: v0.4.0-dev
     4  //  VPP:              23.02-rc0~189-g57127b32a
     5  // source: /usr/share/vpp/api/plugins/pot.api.json
     6  
     7  // Package pot contains generated bindings for API file pot.api.
     8  //
     9  // Contents:
    10  //   8 messages
    11  //
    12  package pot
    13  
    14  import (
    15  	api "git.fd.io/govpp.git/api"
    16  	codec "git.fd.io/govpp.git/codec"
    17  )
    18  
    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
    24  
    25  const (
    26  	APIFile    = "pot"
    27  	APIVersion = "1.0.0"
    28  	VersionCrc = 0xa9d8e55c
    29  )
    30  
    31  // PotProfileActivate defines message 'pot_profile_activate'.
    32  type PotProfileActivate struct {
    33  	ID       uint8  `binapi:"u8,name=id" json:"id,omitempty"`
    34  	ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
    35  }
    36  
    37  func (m *PotProfileActivate) Reset()               { *m = PotProfileActivate{} }
    38  func (*PotProfileActivate) GetMessageName() string { return "pot_profile_activate" }
    39  func (*PotProfileActivate) GetCrcString() string   { return "0770af98" }
    40  func (*PotProfileActivate) GetMessageType() api.MessageType {
    41  	return api.RequestMessage
    42  }
    43  
    44  func (m *PotProfileActivate) Size() (size int) {
    45  	if m == nil {
    46  		return 0
    47  	}
    48  	size += 1                   // m.ID
    49  	size += 4 + len(m.ListName) // m.ListName
    50  	return size
    51  }
    52  func (m *PotProfileActivate) Marshal(b []byte) ([]byte, error) {
    53  	if b == nil {
    54  		b = make([]byte, m.Size())
    55  	}
    56  	buf := codec.NewBuffer(b)
    57  	buf.EncodeUint8(m.ID)
    58  	buf.EncodeString(m.ListName, 0)
    59  	return buf.Bytes(), nil
    60  }
    61  func (m *PotProfileActivate) Unmarshal(b []byte) error {
    62  	buf := codec.NewBuffer(b)
    63  	m.ID = buf.DecodeUint8()
    64  	m.ListName = buf.DecodeString(0)
    65  	return nil
    66  }
    67  
    68  // PotProfileActivateReply defines message 'pot_profile_activate_reply'.
    69  type PotProfileActivateReply struct {
    70  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
    71  }
    72  
    73  func (m *PotProfileActivateReply) Reset()               { *m = PotProfileActivateReply{} }
    74  func (*PotProfileActivateReply) GetMessageName() string { return "pot_profile_activate_reply" }
    75  func (*PotProfileActivateReply) GetCrcString() string   { return "e8d4e804" }
    76  func (*PotProfileActivateReply) GetMessageType() api.MessageType {
    77  	return api.ReplyMessage
    78  }
    79  
    80  func (m *PotProfileActivateReply) Size() (size int) {
    81  	if m == nil {
    82  		return 0
    83  	}
    84  	size += 4 // m.Retval
    85  	return size
    86  }
    87  func (m *PotProfileActivateReply) Marshal(b []byte) ([]byte, error) {
    88  	if b == nil {
    89  		b = make([]byte, m.Size())
    90  	}
    91  	buf := codec.NewBuffer(b)
    92  	buf.EncodeInt32(m.Retval)
    93  	return buf.Bytes(), nil
    94  }
    95  func (m *PotProfileActivateReply) Unmarshal(b []byte) error {
    96  	buf := codec.NewBuffer(b)
    97  	m.Retval = buf.DecodeInt32()
    98  	return nil
    99  }
   100  
   101  // PotProfileAdd defines message 'pot_profile_add'.
   102  type PotProfileAdd struct {
   103  	ID               uint8  `binapi:"u8,name=id" json:"id,omitempty"`
   104  	Validator        uint8  `binapi:"u8,name=validator" json:"validator,omitempty"`
   105  	SecretKey        uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
   106  	SecretShare      uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
   107  	Prime            uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
   108  	MaxBits          uint8  `binapi:"u8,name=max_bits" json:"max_bits,omitempty"`
   109  	Lpc              uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
   110  	PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
   111  	ListName         string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
   112  }
   113  
   114  func (m *PotProfileAdd) Reset()               { *m = PotProfileAdd{} }
   115  func (*PotProfileAdd) GetMessageName() string { return "pot_profile_add" }
   116  func (*PotProfileAdd) GetCrcString() string   { return "ad5da3a3" }
   117  func (*PotProfileAdd) GetMessageType() api.MessageType {
   118  	return api.RequestMessage
   119  }
   120  
   121  func (m *PotProfileAdd) Size() (size int) {
   122  	if m == nil {
   123  		return 0
   124  	}
   125  	size += 1                   // m.ID
   126  	size += 1                   // m.Validator
   127  	size += 8                   // m.SecretKey
   128  	size += 8                   // m.SecretShare
   129  	size += 8                   // m.Prime
   130  	size += 1                   // m.MaxBits
   131  	size += 8                   // m.Lpc
   132  	size += 8                   // m.PolynomialPublic
   133  	size += 4 + len(m.ListName) // m.ListName
   134  	return size
   135  }
   136  func (m *PotProfileAdd) Marshal(b []byte) ([]byte, error) {
   137  	if b == nil {
   138  		b = make([]byte, m.Size())
   139  	}
   140  	buf := codec.NewBuffer(b)
   141  	buf.EncodeUint8(m.ID)
   142  	buf.EncodeUint8(m.Validator)
   143  	buf.EncodeUint64(m.SecretKey)
   144  	buf.EncodeUint64(m.SecretShare)
   145  	buf.EncodeUint64(m.Prime)
   146  	buf.EncodeUint8(m.MaxBits)
   147  	buf.EncodeUint64(m.Lpc)
   148  	buf.EncodeUint64(m.PolynomialPublic)
   149  	buf.EncodeString(m.ListName, 0)
   150  	return buf.Bytes(), nil
   151  }
   152  func (m *PotProfileAdd) Unmarshal(b []byte) error {
   153  	buf := codec.NewBuffer(b)
   154  	m.ID = buf.DecodeUint8()
   155  	m.Validator = buf.DecodeUint8()
   156  	m.SecretKey = buf.DecodeUint64()
   157  	m.SecretShare = buf.DecodeUint64()
   158  	m.Prime = buf.DecodeUint64()
   159  	m.MaxBits = buf.DecodeUint8()
   160  	m.Lpc = buf.DecodeUint64()
   161  	m.PolynomialPublic = buf.DecodeUint64()
   162  	m.ListName = buf.DecodeString(0)
   163  	return nil
   164  }
   165  
   166  // PotProfileAddReply defines message 'pot_profile_add_reply'.
   167  type PotProfileAddReply struct {
   168  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   169  }
   170  
   171  func (m *PotProfileAddReply) Reset()               { *m = PotProfileAddReply{} }
   172  func (*PotProfileAddReply) GetMessageName() string { return "pot_profile_add_reply" }
   173  func (*PotProfileAddReply) GetCrcString() string   { return "e8d4e804" }
   174  func (*PotProfileAddReply) GetMessageType() api.MessageType {
   175  	return api.ReplyMessage
   176  }
   177  
   178  func (m *PotProfileAddReply) Size() (size int) {
   179  	if m == nil {
   180  		return 0
   181  	}
   182  	size += 4 // m.Retval
   183  	return size
   184  }
   185  func (m *PotProfileAddReply) Marshal(b []byte) ([]byte, error) {
   186  	if b == nil {
   187  		b = make([]byte, m.Size())
   188  	}
   189  	buf := codec.NewBuffer(b)
   190  	buf.EncodeInt32(m.Retval)
   191  	return buf.Bytes(), nil
   192  }
   193  func (m *PotProfileAddReply) Unmarshal(b []byte) error {
   194  	buf := codec.NewBuffer(b)
   195  	m.Retval = buf.DecodeInt32()
   196  	return nil
   197  }
   198  
   199  // PotProfileDel defines message 'pot_profile_del'.
   200  type PotProfileDel struct {
   201  	ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
   202  }
   203  
   204  func (m *PotProfileDel) Reset()               { *m = PotProfileDel{} }
   205  func (*PotProfileDel) GetMessageName() string { return "pot_profile_del" }
   206  func (*PotProfileDel) GetCrcString() string   { return "cd63f53b" }
   207  func (*PotProfileDel) GetMessageType() api.MessageType {
   208  	return api.RequestMessage
   209  }
   210  
   211  func (m *PotProfileDel) Size() (size int) {
   212  	if m == nil {
   213  		return 0
   214  	}
   215  	size += 4 + len(m.ListName) // m.ListName
   216  	return size
   217  }
   218  func (m *PotProfileDel) Marshal(b []byte) ([]byte, error) {
   219  	if b == nil {
   220  		b = make([]byte, m.Size())
   221  	}
   222  	buf := codec.NewBuffer(b)
   223  	buf.EncodeString(m.ListName, 0)
   224  	return buf.Bytes(), nil
   225  }
   226  func (m *PotProfileDel) Unmarshal(b []byte) error {
   227  	buf := codec.NewBuffer(b)
   228  	m.ListName = buf.DecodeString(0)
   229  	return nil
   230  }
   231  
   232  // PotProfileDelReply defines message 'pot_profile_del_reply'.
   233  type PotProfileDelReply struct {
   234  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   235  }
   236  
   237  func (m *PotProfileDelReply) Reset()               { *m = PotProfileDelReply{} }
   238  func (*PotProfileDelReply) GetMessageName() string { return "pot_profile_del_reply" }
   239  func (*PotProfileDelReply) GetCrcString() string   { return "e8d4e804" }
   240  func (*PotProfileDelReply) GetMessageType() api.MessageType {
   241  	return api.ReplyMessage
   242  }
   243  
   244  func (m *PotProfileDelReply) Size() (size int) {
   245  	if m == nil {
   246  		return 0
   247  	}
   248  	size += 4 // m.Retval
   249  	return size
   250  }
   251  func (m *PotProfileDelReply) Marshal(b []byte) ([]byte, error) {
   252  	if b == nil {
   253  		b = make([]byte, m.Size())
   254  	}
   255  	buf := codec.NewBuffer(b)
   256  	buf.EncodeInt32(m.Retval)
   257  	return buf.Bytes(), nil
   258  }
   259  func (m *PotProfileDelReply) Unmarshal(b []byte) error {
   260  	buf := codec.NewBuffer(b)
   261  	m.Retval = buf.DecodeInt32()
   262  	return nil
   263  }
   264  
   265  // PotProfileShowConfigDetails defines message 'pot_profile_show_config_details'.
   266  type PotProfileShowConfigDetails struct {
   267  	Retval           int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   268  	ID               uint8  `binapi:"u8,name=id" json:"id,omitempty"`
   269  	Validator        uint8  `binapi:"u8,name=validator" json:"validator,omitempty"`
   270  	SecretKey        uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
   271  	SecretShare      uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
   272  	Prime            uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
   273  	BitMask          uint64 `binapi:"u64,name=bit_mask" json:"bit_mask,omitempty"`
   274  	Lpc              uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
   275  	PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
   276  }
   277  
   278  func (m *PotProfileShowConfigDetails) Reset()               { *m = PotProfileShowConfigDetails{} }
   279  func (*PotProfileShowConfigDetails) GetMessageName() string { return "pot_profile_show_config_details" }
   280  func (*PotProfileShowConfigDetails) GetCrcString() string   { return "b7ce0618" }
   281  func (*PotProfileShowConfigDetails) GetMessageType() api.MessageType {
   282  	return api.ReplyMessage
   283  }
   284  
   285  func (m *PotProfileShowConfigDetails) Size() (size int) {
   286  	if m == nil {
   287  		return 0
   288  	}
   289  	size += 4 // m.Retval
   290  	size += 1 // m.ID
   291  	size += 1 // m.Validator
   292  	size += 8 // m.SecretKey
   293  	size += 8 // m.SecretShare
   294  	size += 8 // m.Prime
   295  	size += 8 // m.BitMask
   296  	size += 8 // m.Lpc
   297  	size += 8 // m.PolynomialPublic
   298  	return size
   299  }
   300  func (m *PotProfileShowConfigDetails) Marshal(b []byte) ([]byte, error) {
   301  	if b == nil {
   302  		b = make([]byte, m.Size())
   303  	}
   304  	buf := codec.NewBuffer(b)
   305  	buf.EncodeInt32(m.Retval)
   306  	buf.EncodeUint8(m.ID)
   307  	buf.EncodeUint8(m.Validator)
   308  	buf.EncodeUint64(m.SecretKey)
   309  	buf.EncodeUint64(m.SecretShare)
   310  	buf.EncodeUint64(m.Prime)
   311  	buf.EncodeUint64(m.BitMask)
   312  	buf.EncodeUint64(m.Lpc)
   313  	buf.EncodeUint64(m.PolynomialPublic)
   314  	return buf.Bytes(), nil
   315  }
   316  func (m *PotProfileShowConfigDetails) Unmarshal(b []byte) error {
   317  	buf := codec.NewBuffer(b)
   318  	m.Retval = buf.DecodeInt32()
   319  	m.ID = buf.DecodeUint8()
   320  	m.Validator = buf.DecodeUint8()
   321  	m.SecretKey = buf.DecodeUint64()
   322  	m.SecretShare = buf.DecodeUint64()
   323  	m.Prime = buf.DecodeUint64()
   324  	m.BitMask = buf.DecodeUint64()
   325  	m.Lpc = buf.DecodeUint64()
   326  	m.PolynomialPublic = buf.DecodeUint64()
   327  	return nil
   328  }
   329  
   330  // PotProfileShowConfigDump defines message 'pot_profile_show_config_dump'.
   331  type PotProfileShowConfigDump struct {
   332  	ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
   333  }
   334  
   335  func (m *PotProfileShowConfigDump) Reset()               { *m = PotProfileShowConfigDump{} }
   336  func (*PotProfileShowConfigDump) GetMessageName() string { return "pot_profile_show_config_dump" }
   337  func (*PotProfileShowConfigDump) GetCrcString() string   { return "005b7d59" }
   338  func (*PotProfileShowConfigDump) GetMessageType() api.MessageType {
   339  	return api.RequestMessage
   340  }
   341  
   342  func (m *PotProfileShowConfigDump) Size() (size int) {
   343  	if m == nil {
   344  		return 0
   345  	}
   346  	size += 1 // m.ID
   347  	return size
   348  }
   349  func (m *PotProfileShowConfigDump) Marshal(b []byte) ([]byte, error) {
   350  	if b == nil {
   351  		b = make([]byte, m.Size())
   352  	}
   353  	buf := codec.NewBuffer(b)
   354  	buf.EncodeUint8(m.ID)
   355  	return buf.Bytes(), nil
   356  }
   357  func (m *PotProfileShowConfigDump) Unmarshal(b []byte) error {
   358  	buf := codec.NewBuffer(b)
   359  	m.ID = buf.DecodeUint8()
   360  	return nil
   361  }
   362  
   363  func init() { file_pot_binapi_init() }
   364  func file_pot_binapi_init() {
   365  	api.RegisterMessage((*PotProfileActivate)(nil), "pot_profile_activate_0770af98")
   366  	api.RegisterMessage((*PotProfileActivateReply)(nil), "pot_profile_activate_reply_e8d4e804")
   367  	api.RegisterMessage((*PotProfileAdd)(nil), "pot_profile_add_ad5da3a3")
   368  	api.RegisterMessage((*PotProfileAddReply)(nil), "pot_profile_add_reply_e8d4e804")
   369  	api.RegisterMessage((*PotProfileDel)(nil), "pot_profile_del_cd63f53b")
   370  	api.RegisterMessage((*PotProfileDelReply)(nil), "pot_profile_del_reply_e8d4e804")
   371  	api.RegisterMessage((*PotProfileShowConfigDetails)(nil), "pot_profile_show_config_details_b7ce0618")
   372  	api.RegisterMessage((*PotProfileShowConfigDump)(nil), "pot_profile_show_config_dump_005b7d59")
   373  }
   374  
   375  // Messages returns list of all messages in this module.
   376  func AllMessages() []api.Message {
   377  	return []api.Message{
   378  		(*PotProfileActivate)(nil),
   379  		(*PotProfileActivateReply)(nil),
   380  		(*PotProfileAdd)(nil),
   381  		(*PotProfileAddReply)(nil),
   382  		(*PotProfileDel)(nil),
   383  		(*PotProfileDelReply)(nil),
   384  		(*PotProfileShowConfigDetails)(nil),
   385  		(*PotProfileShowConfigDump)(nil),
   386  	}
   387  }