vault

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package vault provides the interfaces for vault provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitInfo added in v0.1.0

type CommitInfo struct {
	SHA  string
	Date time.Time
}

CommitInfo represents information about a commit for history operations.

type FileInfo

type FileInfo struct {
	Path      string
	SHA       string
	Size      int
	UpdatedAt time.Time
}

FileInfo represents information about a file in the vault.

type HistoryProvider added in v0.1.0

type HistoryProvider interface {
	Provider
	ListCommits(ctx context.Context, path string) ([]CommitInfo, error)
	ResetBranchToCommit(ctx context.Context, branch, sha string) error
}

HistoryProvider extends Provider with commit history operations. This is used for the --hard flag to wipe commit history.

type Provider

type Provider interface {
	CheckConnectivity(ctx context.Context) error
	UploadFile(ctx context.Context, path string, content []byte, message string) error
	DownloadFile(ctx context.Context, path string) ([]byte, error)
	DeleteFile(ctx context.Context, path, sha, message string) error
	ListFiles(ctx context.Context) ([]FileInfo, error)
	GetFileSHA(ctx context.Context, path string) (string, error)
	Owner() string
	Repo() string
	RepoURL() string
}

Provider defines the interface for vault operations.

Jump to

Keyboard shortcuts

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