reftable

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright (c) 2016-present GitLab Inc. SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Name

type Name struct {
	// MinUpdateIndex is the minimum update index contained in the file.
	MinUpdateIndex uint64
	// MinUpdateIndex is the maximum update index contained in the file.
	MaxUpdateIndex uint64
	// Suffix is the random suffix in the table's name.
	Suffix string
}

Name contains the structured information in the name of a .ref file.

func ParseName

func ParseName(reftableName string) (Name, error)

ParseName parses the name of a reftable file.

func ReadTablesList

func ReadTablesList(repoPath string) ([]Name, error)

ReadTablesList returns a list of tables in the "tables.list" for the reftable backend.

func (Name) String

func (n Name) String() string

String returns the string representation of the reftable name.

type Table

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

Table represents .ref table file.

func ParseTable

func ParseTable(absolutePath string) (_ *Table, returnedErr error)

ParseTable opens the table at the given path and parses it. Close must be called once the table is no longer used to close the associated file.

func (*Table) Close

func (t *Table) Close() error

Close closes the table's associated file.

func (*Table) GetReferences

func (t *Table) GetReferences() ([]git.Reference, error)

GetReferences returns all references from the table.

func (*Table) MaxUpdateIndex

func (t *Table) MaxUpdateIndex() uint64

MaxUpdateIndex is the maximum update index in the table.

func (*Table) MinUpdateIndex

func (t *Table) MinUpdateIndex() uint64

MinUpdateIndex is the minimum update index in the table.

func (*Table) PatchUpdateIndexes

func (t *Table) PatchUpdateIndexes(min, max uint64) (returnedErr error)

PatchUpdateIndexes patches in-place the update indexes stored in the table's header and footer, and syncs the file to the disk.

Jump to

Keyboard shortcuts

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