filemd

package
v3.6.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthFilemd = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFilemd   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	// Sections within the data object.
	Sections []*SectionInfo `protobuf:"bytes,1,rep,name=sections,proto3" json:"sections,omitempty"`
	// A list of strings used to resolve type name references.
	Dictionary []string `protobuf:"bytes,2,rep,name=dictionary,proto3" json:"dictionary,omitempty"`
	// A list of types used by sections. The zero index is reserved for an
	// invalid type.
	Types []*SectionType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
}

Metadata for the overall data object.

func (*Metadata) Descriptor

func (*Metadata) Descriptor() ([]byte, []int)

func (*Metadata) Equal

func (this *Metadata) Equal(that interface{}) bool

func (*Metadata) GetDictionary added in v3.6.0

func (m *Metadata) GetDictionary() []string

func (*Metadata) GetSections

func (m *Metadata) GetSections() []*SectionInfo

func (*Metadata) GetTypes added in v3.6.0

func (m *Metadata) GetTypes() []*SectionType

func (*Metadata) GoString

func (this *Metadata) GoString() string

func (*Metadata) Marshal

func (m *Metadata) Marshal() (dAtA []byte, err error)

func (*Metadata) MarshalTo

func (m *Metadata) MarshalTo(dAtA []byte) (int, error)

func (*Metadata) MarshalToSizedBuffer

func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) Size

func (m *Metadata) Size() (n int)

func (*Metadata) String

func (this *Metadata) String() string

func (*Metadata) Unmarshal

func (m *Metadata) Unmarshal(dAtA []byte) error

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metadata) XXX_Merge

func (m *Metadata) XXX_Merge(src proto.Message)

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

func (m *Metadata) XXX_Unmarshal(b []byte) error

type Region added in v3.6.0

type Region struct {
	// Byte offset of the region from the start of the data object.
	Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	// Length of the region in bytes.
	Length uint64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"`
}

Region describes a contiguous range of bytes within a data object.

func (*Region) Descriptor added in v3.6.0

func (*Region) Descriptor() ([]byte, []int)

func (*Region) Equal added in v3.6.0

func (this *Region) Equal(that interface{}) bool

func (*Region) GetLength added in v3.6.0

func (m *Region) GetLength() uint64

func (*Region) GetOffset added in v3.6.0

func (m *Region) GetOffset() uint64

func (*Region) GoString added in v3.6.0

func (this *Region) GoString() string

func (*Region) Marshal added in v3.6.0

func (m *Region) Marshal() (dAtA []byte, err error)

func (*Region) MarshalTo added in v3.6.0

func (m *Region) MarshalTo(dAtA []byte) (int, error)

func (*Region) MarshalToSizedBuffer added in v3.6.0

func (m *Region) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Region) ProtoMessage added in v3.6.0

func (*Region) ProtoMessage()

func (*Region) Reset added in v3.6.0

func (m *Region) Reset()

func (*Region) Size added in v3.6.0

func (m *Region) Size() (n int)

func (*Region) String added in v3.6.0

func (this *Region) String() string

func (*Region) Unmarshal added in v3.6.0

func (m *Region) Unmarshal(dAtA []byte) error

func (*Region) XXX_DiscardUnknown added in v3.6.0

func (m *Region) XXX_DiscardUnknown()

func (*Region) XXX_Marshal added in v3.6.0

func (m *Region) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Region) XXX_Merge added in v3.6.0

func (m *Region) XXX_Merge(src proto.Message)

func (*Region) XXX_Size added in v3.6.0

func (m *Region) XXX_Size() int

func (*Region) XXX_Unmarshal added in v3.6.0

func (m *Region) XXX_Unmarshal(b []byte) error

type SectionInfo

type SectionInfo struct {
	// The physical layout of the section within the data object. Setting
	// layout is mutually exclusive with specifying the metadata_offset and
	// metadata_size fields.
	//
	// For backwards compatibility with older versions of data objects where
	// layout isn't provided, implementations must assume that:
	//
	//   - A section has data, but its offset and length are unknown.
	//
	//   - Range reads of section data are done relative to the start of the
	//     data object.
	//
	// If the SectionLayout is specified for a section, range reads are instead
	// relative to the start of the data region. If the data region is undefined,
	// then the section has no data.
	//
	// Setting the layout is mutually exclusive with specifying the
	// metadata_offset and metadata_size fields, and readers must reject data
	// objects that set both.
	Layout *SectionLayout `protobuf:"bytes,4,opt,name=layout,proto3" json:"layout,omitempty"`
	// An index into Metadata.types specifying the type of this section.
	TypeRef uint32 `protobuf:"varint,5,opt,name=type_ref,json=typeRef,proto3" json:"type_ref,omitempty"`
	// Optional additional information about the section that sections can
	// provide.
	//
	// Because extension_data increases the size of the file metadata, sections
	// should only use this field for required information that must be stored
	// without loading the section.
	//
	// Sections implementations are recommended to use the version field of
	// [SectionType] to determine how to interpret the payload.
	ExtensionData []byte `protobuf:"bytes,6,opt,name=extension_data,json=extensionData,proto3" json:"extension_data,omitempty"`
	// An index into Metadata.dictionary specifying the owning tenant of this
	// section.
	//
	// Sections containing data wholly owned by a single tenant must specify the
	// owning tenant. If tenant_ref is 0, the section holds data owned by multiple
	// tenants, usually with some other mechanism to determine ownership (e.g., if
	// the section does not contain cross-tenant aggregated data).
	TenantRef uint32 `protobuf:"varint,7,opt,name=tenant_ref,json=tenantRef,proto3" json:"tenant_ref,omitempty"`
}

SectionInfo describes a section within the data object. Each section is an independent unit of the data object.

func (*SectionInfo) Descriptor

func (*SectionInfo) Descriptor() ([]byte, []int)

func (*SectionInfo) Equal

func (this *SectionInfo) Equal(that interface{}) bool

func (*SectionInfo) GetExtensionData added in v3.6.0

func (m *SectionInfo) GetExtensionData() []byte

func (*SectionInfo) GetLayout added in v3.6.0

func (m *SectionInfo) GetLayout() *SectionLayout

func (*SectionInfo) GetTenantRef added in v3.6.0

func (m *SectionInfo) GetTenantRef() uint32

func (*SectionInfo) GetTypeRef added in v3.6.0

func (m *SectionInfo) GetTypeRef() uint32

func (*SectionInfo) GoString

func (this *SectionInfo) GoString() string

func (*SectionInfo) Marshal

func (m *SectionInfo) Marshal() (dAtA []byte, err error)

func (*SectionInfo) MarshalTo

func (m *SectionInfo) MarshalTo(dAtA []byte) (int, error)

func (*SectionInfo) MarshalToSizedBuffer

func (m *SectionInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SectionInfo) ProtoMessage

func (*SectionInfo) ProtoMessage()

func (*SectionInfo) Reset

func (m *SectionInfo) Reset()

func (*SectionInfo) Size

func (m *SectionInfo) Size() (n int)

func (*SectionInfo) String

func (this *SectionInfo) String() string

func (*SectionInfo) Unmarshal

func (m *SectionInfo) Unmarshal(dAtA []byte) error

func (*SectionInfo) XXX_DiscardUnknown

func (m *SectionInfo) XXX_DiscardUnknown()

func (*SectionInfo) XXX_Marshal

func (m *SectionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SectionInfo) XXX_Merge

func (m *SectionInfo) XXX_Merge(src proto.Message)

func (*SectionInfo) XXX_Size

func (m *SectionInfo) XXX_Size() int

func (*SectionInfo) XXX_Unmarshal

func (m *SectionInfo) XXX_Unmarshal(b []byte) error

type SectionLayout added in v3.6.0

type SectionLayout struct {
	// The region covering the data of a section. If the data region is
	// undefined, implementations must assume that the section has no data.
	Data *Region `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// The region covering the metadata of a section. If the metadata region is
	// undefined, implementations must assume that the section has no metadata.
	Metadata *Region `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

SectionLayout describes the physical placement of the regions that form a complete section: its data and its metadata.

The metadata of a section is intended to be lightweight and is typically used to aid reading the section's data in smaller chunks.

There are no guarantees about the placement or ordering of a section's regions; they may be contiguous, disjoint, or interleaved with regions from other sections.

Implementations can use region information to ensure that a section does not access bytes outside of its layout.

func (*SectionLayout) Descriptor added in v3.6.0

func (*SectionLayout) Descriptor() ([]byte, []int)

func (*SectionLayout) Equal added in v3.6.0

func (this *SectionLayout) Equal(that interface{}) bool

func (*SectionLayout) GetData added in v3.6.0

func (m *SectionLayout) GetData() *Region

func (*SectionLayout) GetMetadata added in v3.6.0

func (m *SectionLayout) GetMetadata() *Region

func (*SectionLayout) GoString added in v3.6.0

func (this *SectionLayout) GoString() string

func (*SectionLayout) Marshal added in v3.6.0

func (m *SectionLayout) Marshal() (dAtA []byte, err error)

func (*SectionLayout) MarshalTo added in v3.6.0

func (m *SectionLayout) MarshalTo(dAtA []byte) (int, error)

func (*SectionLayout) MarshalToSizedBuffer added in v3.6.0

func (m *SectionLayout) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SectionLayout) ProtoMessage added in v3.6.0

func (*SectionLayout) ProtoMessage()

func (*SectionLayout) Reset added in v3.6.0

func (m *SectionLayout) Reset()

func (*SectionLayout) Size added in v3.6.0

func (m *SectionLayout) Size() (n int)

func (*SectionLayout) String added in v3.6.0

func (this *SectionLayout) String() string

func (*SectionLayout) Unmarshal added in v3.6.0

func (m *SectionLayout) Unmarshal(dAtA []byte) error

func (*SectionLayout) XXX_DiscardUnknown added in v3.6.0

func (m *SectionLayout) XXX_DiscardUnknown()

func (*SectionLayout) XXX_Marshal added in v3.6.0

func (m *SectionLayout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SectionLayout) XXX_Merge added in v3.6.0

func (m *SectionLayout) XXX_Merge(src proto.Message)

func (*SectionLayout) XXX_Size added in v3.6.0

func (m *SectionLayout) XXX_Size() int

func (*SectionLayout) XXX_Unmarshal added in v3.6.0

func (m *SectionLayout) XXX_Unmarshal(b []byte) error

type SectionType

type SectionType struct {
	// The reference to the type name.
	NameRef *SectionType_NameRef `protobuf:"bytes,1,opt,name=name_ref,json=nameRef,proto3" json:"name_ref,omitempty"`
	// An optional section-specified version of this type, used to inform section
	// implementations how to read the section.
	Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
}

SectionType specifies a namespaced type of section within a data object. Applications are responsible for interpreting SectionType for decoding.

func (*SectionType) Descriptor added in v3.6.0

func (*SectionType) Descriptor() ([]byte, []int)

func (*SectionType) Equal added in v3.6.0

func (this *SectionType) Equal(that interface{}) bool

func (*SectionType) GetNameRef added in v3.6.0

func (m *SectionType) GetNameRef() *SectionType_NameRef

func (*SectionType) GetVersion added in v3.6.0

func (m *SectionType) GetVersion() uint32

func (*SectionType) GoString added in v3.6.0

func (this *SectionType) GoString() string

func (*SectionType) Marshal added in v3.6.0

func (m *SectionType) Marshal() (dAtA []byte, err error)

func (*SectionType) MarshalTo added in v3.6.0

func (m *SectionType) MarshalTo(dAtA []byte) (int, error)

func (*SectionType) MarshalToSizedBuffer added in v3.6.0

func (m *SectionType) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SectionType) ProtoMessage added in v3.6.0

func (*SectionType) ProtoMessage()

func (*SectionType) Reset added in v3.6.0

func (m *SectionType) Reset()

func (*SectionType) Size added in v3.6.0

func (m *SectionType) Size() (n int)

func (*SectionType) String

func (this *SectionType) String() string

func (*SectionType) Unmarshal added in v3.6.0

func (m *SectionType) Unmarshal(dAtA []byte) error

func (*SectionType) XXX_DiscardUnknown added in v3.6.0

func (m *SectionType) XXX_DiscardUnknown()

func (*SectionType) XXX_Marshal added in v3.6.0

func (m *SectionType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SectionType) XXX_Merge added in v3.6.0

func (m *SectionType) XXX_Merge(src proto.Message)

func (*SectionType) XXX_Size added in v3.6.0

func (m *SectionType) XXX_Size() int

func (*SectionType) XXX_Unmarshal added in v3.6.0

func (m *SectionType) XXX_Unmarshal(b []byte) error

type SectionType_NameRef added in v3.6.0

type SectionType_NameRef struct {
	// An index into Metadata.dictionary specifying the namespace string of
	// this type (e.g., "github.com/grafana/loki").
	NamespaceRef uint32 `protobuf:"varint,1,opt,name=namespace_ref,json=namespaceRef,proto3" json:"namespace_ref,omitempty"`
	// An index into Metadata.dictionary specifying the kind of this type
	// (e.g., "logs").
	KindRef uint32 `protobuf:"varint,2,opt,name=kind_ref,json=kindRef,proto3" json:"kind_ref,omitempty"`
}

NameRef is a tuple of references into the Metadata.dictionary which specifies the fully-qualified name of this type.

Two data objects may have the same NameRef which refer to different names when resolved. Applications must resolve the name before interpreting the type.

func (*SectionType_NameRef) Descriptor added in v3.6.0

func (*SectionType_NameRef) Descriptor() ([]byte, []int)

func (*SectionType_NameRef) Equal added in v3.6.0

func (this *SectionType_NameRef) Equal(that interface{}) bool

func (*SectionType_NameRef) GetKindRef added in v3.6.0

func (m *SectionType_NameRef) GetKindRef() uint32

func (*SectionType_NameRef) GetNamespaceRef added in v3.6.0

func (m *SectionType_NameRef) GetNamespaceRef() uint32

func (*SectionType_NameRef) GoString added in v3.6.0

func (this *SectionType_NameRef) GoString() string

func (*SectionType_NameRef) Marshal added in v3.6.0

func (m *SectionType_NameRef) Marshal() (dAtA []byte, err error)

func (*SectionType_NameRef) MarshalTo added in v3.6.0

func (m *SectionType_NameRef) MarshalTo(dAtA []byte) (int, error)

func (*SectionType_NameRef) MarshalToSizedBuffer added in v3.6.0

func (m *SectionType_NameRef) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SectionType_NameRef) ProtoMessage added in v3.6.0

func (*SectionType_NameRef) ProtoMessage()

func (*SectionType_NameRef) Reset added in v3.6.0

func (m *SectionType_NameRef) Reset()

func (*SectionType_NameRef) Size added in v3.6.0

func (m *SectionType_NameRef) Size() (n int)

func (*SectionType_NameRef) String added in v3.6.0

func (this *SectionType_NameRef) String() string

func (*SectionType_NameRef) Unmarshal added in v3.6.0

func (m *SectionType_NameRef) Unmarshal(dAtA []byte) error

func (*SectionType_NameRef) XXX_DiscardUnknown added in v3.6.0

func (m *SectionType_NameRef) XXX_DiscardUnknown()

func (*SectionType_NameRef) XXX_Marshal added in v3.6.0

func (m *SectionType_NameRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SectionType_NameRef) XXX_Merge added in v3.6.0

func (m *SectionType_NameRef) XXX_Merge(src proto.Message)

func (*SectionType_NameRef) XXX_Size added in v3.6.0

func (m *SectionType_NameRef) XXX_Size() int

func (*SectionType_NameRef) XXX_Unmarshal added in v3.6.0

func (m *SectionType_NameRef) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL