Skip to main content

BlockOffset.go

BlockOffset.go - Overview

This file is auto-generated by the FlatBuffers compiler. It defines the FlatBuffers schema for the BlockOffset table, used for storing key, offset, and length information.

BlockOffset

  • Purpose: Represents a block offset with key and offset information.
  • Fields:
    • _tab: flatbuffers.Table - FlatBuffers table.

GetRootAsBlockOffset

  • Purpose: Retrieves the root as a BlockOffset from a byte slice.
  • Parameters:
    • buf: []byte - Byte slice containing the FlatBuffers data.
    • offset: flatbuffers.UOffsetT - Offset of the root.
  • Returns: *BlockOffset - A pointer to the BlockOffset struct.

BlockOffset.Init

  • Purpose: Initializes the BlockOffset struct with the given byte slice and offset.
  • Parameters:
    • buf: []byte - Byte slice containing the FlatBuffers data.
    • i: flatbuffers.UOffsetT - Offset of the BlockOffset within the byte slice.
  • Returns: None

BlockOffset.Table

  • Purpose: Returns the underlying FlatBuffers table.
  • Parameters: None
  • Returns: flatbuffers.Table - The FlatBuffers table.

BlockOffset.Key

  • Purpose: Retrieves a byte from the Key field at the given index.
  • Parameters:
    • j: int - Index of the byte to retrieve.
  • Returns: byte - The byte at the specified index.

BlockOffset.KeyLength

  • Purpose: Returns the length of the Key field.
  • Parameters: None
  • Returns: int - The length of the Key field.

BlockOffset.KeyBytes

  • Purpose: Returns the Key field as a byte slice.
  • Parameters: None
  • Returns: []byte - The Key field as a byte slice.

BlockOffset.MutateKey

  • Purpose: Mutates a byte in the Key field at the given index.
  • Parameters:
    • j: int - Index of the byte to mutate.
    • n: byte - The new value for the byte.
  • Returns: bool - True if the mutation was successful, false otherwise.

BlockOffset.Offset

  • Purpose: Retrieves the Offset field.
  • Parameters: None
  • Returns: uint32 - The value of the Offset field.

BlockOffset.MutateOffset

  • Purpose: Mutates the Offset field.
  • Parameters:
    • n: uint32 - The new value for the Offset field.
  • Returns: bool - True if the mutation was successful, false otherwise.

BlockOffset.Len

  • Purpose: Retrieves the Len field.
  • Parameters: None
  • Returns: uint32 - The value of the Len field.

BlockOffset.MutateLen

  • Purpose: Mutates the Len field.
  • Parameters:
    • n: uint32 - The new value for the Len field.
  • Returns: bool - True if the mutation was successful, false otherwise.

BlockOffsetStart

  • Purpose: Marks the beginning of the BlockOffset object construction.
  • Parameters:
    • builder: *flatbuffers.Builder - FlatBuffers builder.
  • Returns: None

BlockOffsetAddKey

  • Purpose: Adds the Key field to the BlockOffset object.
  • Parameters:
    • builder: *flatbuffers.Builder - FlatBuffers builder.
    • key: flatbuffers.UOffsetT - Offset to the Key data.
  • Returns: None

BlockOffsetStartKeyVector

  • Purpose: Starts the Key vector.
  • Parameters:
    • builder: *flatbuffers.Builder - FlatBuffers builder.
    • numElems: int - Number of elements in the vector.
  • Returns: flatbuffers.UOffsetT - Offset to the beginning of the vector.

BlockOffsetAddOffset

  • Purpose: Adds the Offset field to the BlockOffset object.
  • Parameters:
    • builder: *flatbuffers.Builder - FlatBuffers builder.
    • offset: uint32 - Offset value.
  • Returns: None

BlockOffsetAddLen

  • Purpose: Adds the Len field to the BlockOffset object.
  • Parameters:
    • builder: *flatbuffers.Builder - FlatBuffers builder.
    • len: uint32 - Length value.
  • Returns: None

BlockOffsetEnd

  • Purpose: Marks the end of the BlockOffset object construction.
  • Parameters:
    • builder: *flatbuffers.Builder - FlatBuffers builder.
  • Returns: flatbuffers.UOffsetT - Offset to the constructed BlockOffset object.