atomgit

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 15 Imported by: ? 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.

README

AtomGit source

Mount a fixed commit from the official AtomGit v5 API with atomgit.Open(ctx, atomgit.Options{Owner: owner, Repository: repo, Ref: ref}). The driver resolves the branch or commit once. Set RootPath to mount an exact subdirectory. Public repositories can use the default client. For private repositories, supply a client with the required AtomGit authorization for api.atomgit.com. The caller owns that client and its credentials. The driver does not follow redirects.

Install the returned driver with Core Install. Core Stat, List, Open and the source side of Copy use the same fixed commit. Native numbered directory pages continue until an explicit empty tree. Directory metadata does not report file sizes. Symbolic links and submodules are not traversed.

The raw endpoint streams the bytes stored in Git at the selected path and commit. Git LFS pointer files are exposed as stored in Git. HTTP byte ranges are returned only when the server supplies a matching partial response. The control response cap defaults to 4 MiB and can be changed with MaxResponseBytes.

Authentication · Commit · Tree · Raw file

Documentation

Overview

Package atomgit mounts an immutable AtomGit commit as a read-only tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

func Open

func Open(ctx context.Context, o Options) (*Driver, error)

Open resolves the ref once and optionally mounts a selected subdirectory. Close a non-nil failed result to retry retained response cleanup.

func (*Driver) Close

func (d *Driver) Close() error

Close retries retained response cleanup. The host still owns the transport.

func (*Driver) Enumerate

func (d *Driver) Enumerate(ctx context.Context, q core.NativeQuery) (core.Iterator, error)

func (*Driver) Open

func (d *Driver) Open(ctx context.Context, address core.NativeAddress, o core.OpenOptions) (core.Opened, error)

func (*Driver) Stat

func (d *Driver) Stat(ctx context.Context, address core.NativeAddress, selections ...core.ReadSelection) (core.Metadata, error)

type Options

type Options struct {
	Owner, Repository string
	Ref, RootPath     string
	Client            *http.Client
	MaxResponseBytes  int64
}

Options selects a repository and ref. A nil Client permits anonymous access where the AtomGit API allows it.

Jump to

Keyboard shortcuts

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