chunk

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package chunk provides domain types for chunk-level metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LineRange

type LineRange struct {
	// contains filtered or unexported fields
}

LineRange records the 1-based start and end line of a chunk enrichment within its source file. Immutable value object.

func NewLineRange

func NewLineRange(enrichmentID int64, startLine, endLine int) LineRange

NewLineRange creates a LineRange for a new enrichment (not yet persisted).

func ReconstructLineRange

func ReconstructLineRange(id, enrichmentID int64, startLine, endLine int) LineRange

ReconstructLineRange recreates a LineRange from persistence.

func (LineRange) EndLine

func (r LineRange) EndLine() int

EndLine returns the 1-based last line.

func (LineRange) EnrichmentID

func (r LineRange) EnrichmentID() int64

EnrichmentID returns the associated enrichment's ID.

func (LineRange) ID

func (r LineRange) ID() int64

ID returns the database identifier.

func (LineRange) StartLine

func (r LineRange) StartLine() int

StartLine returns the 1-based first line.

type LineRangeStore

type LineRangeStore interface {
	repository.Store[LineRange]
}

LineRangeStore defines persistence for chunk line ranges.

Jump to

Keyboard shortcuts

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