chunk

package
v1.2.2 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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