• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Code generated by the FlatBuffers compiler. DO NOT EDIT.
2
3package models
4
5import (
6	flatbuffers "github.com/google/flatbuffers/go"
7)
8
9type HelloRequest struct {
10	_tab flatbuffers.Table
11}
12
13func GetRootAsHelloRequest(buf []byte, offset flatbuffers.UOffsetT) *HelloRequest {
14	n := flatbuffers.GetUOffsetT(buf[offset:])
15	x := &HelloRequest{}
16	x.Init(buf, n+offset)
17	return x
18}
19
20func GetSizePrefixedRootAsHelloRequest(buf []byte, offset flatbuffers.UOffsetT) *HelloRequest {
21	n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
22	x := &HelloRequest{}
23	x.Init(buf, n+offset+flatbuffers.SizeUint32)
24	return x
25}
26
27func (rcv *HelloRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
28	rcv._tab.Bytes = buf
29	rcv._tab.Pos = i
30}
31
32func (rcv *HelloRequest) Table() flatbuffers.Table {
33	return rcv._tab
34}
35
36func (rcv *HelloRequest) Name() []byte {
37	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
38	if o != 0 {
39		return rcv._tab.ByteVector(o + rcv._tab.Pos)
40	}
41	return nil
42}
43
44func HelloRequestStart(builder *flatbuffers.Builder) {
45	builder.StartObject(1)
46}
47func HelloRequestAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
48	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
49}
50func HelloRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
51	return builder.EndObject()
52}
53