Documentation
¶
Index ¶
- Constants
- Variables
- func ExecutableFiles(repoPath string) (map[string]bool, error)
- func ParseSigningKey(armored, passphrase string) (*openpgp.Entity, error)
- func RepositoryAttribute(rawURL string) attribute.KeyValue
- func ValidatePath(repoPath, requestedPath string) error
- type AuthConfig
- type BranchInfo
- type Client
- func (c *Client) BrowseTree(ctx context.Context, repoPath, targetPath string) ([]types.FileTreeNode, error)
- func (c *Client) CheckoutForWrite(ctx context.Context, url, branch string, auth AuthConfig) (*WriteCheckout, error)
- func (c *Client) Clone(ctx context.Context, url, branch string, auth AuthConfig, depth int) (repoPath string, err error)
- func (c *Client) CommitAndPush(ctx context.Context, checkout *WriteCheckout, req CommitRequest, ...) (string, bool, error)
- func (c *Client) CommitDiff(ctx context.Context, repoPath, commitHash, directory string) (HistoryEntry, []FileDiff, error)
- func (c *Client) DirectoryHistory(ctx context.Context, repoPath, directory string, limit int) ([]HistoryEntry, error)
- func (c *Client) Discard(ctx context.Context, repoPath string)
- func (c *Client) FileExists(ctx context.Context, repoPath, filePath string) bool
- func (c *Client) GetCurrentCommit(ctx context.Context, repoPath string) (string, error)
- func (c *Client) ListBranches(ctx context.Context, url string, auth AuthConfig) ([]BranchInfo, error)
- func (c *Client) ProbeRemote(ctx context.Context, url string, auth AuthConfig) error
- func (c *Client) PurgeScratchDirs(ctx context.Context, maxAge time.Duration) (int, error)
- func (c *Client) ReadFile(ctx context.Context, repoPath, filePath string) (string, error)
- func (c *Client) RemoteBranchHead(ctx context.Context, url, branch string, auth AuthConfig) (string, bool, error)
- func (c *Client) TestConnection(ctx context.Context, url, branch string, auth AuthConfig) error
- func (c *Client) WalkDirectory(ctx context.Context, repoPath, composePath string, maxFiles int, ...) (*DirectoryWalkResult, error)
- type CollectOptions
- type CommitFile
- type CommitIdentity
- type CommitRequest
- type DirectoryWalkResult
- type FileDiff
- type HistoryEntry
- type SyncFileInfo
- type WriteCheckout
Constants ¶
View Source
const ( CloneScratchPrefix = "gitops-" SSHHostKeyVerificationStrict = "strict" SSHHostKeyVerificationAcceptNew = "accept_new" SSHHostKeyVerificationSkip = "skip" // Skip host key verification (insecure) )
Variables ¶
View Source
var ( ErrPushRejected = errors.New("push rejected: remote branch was updated by another writer") ErrInvalidCommit = errors.New("invalid commit hash") ErrSelectionUnreadable = errors.New("selection is unreadable") ErrSelectionLimits = errors.New("selection exceeds limits") ErrSelectionInvalid = errors.New("selection is invalid") )
Functions ¶
func ExecutableFiles ¶ added in v3.1.0
func RepositoryAttribute ¶
func ValidatePath ¶
Types ¶
type AuthConfig ¶
type BranchInfo ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) BrowseTree ¶
func (*Client) CheckoutForWrite ¶
func (c *Client) CheckoutForWrite(ctx context.Context, url, branch string, auth AuthConfig) (*WriteCheckout, error)
func (*Client) CommitAndPush ¶
func (c *Client) CommitAndPush(ctx context.Context, checkout *WriteCheckout, req CommitRequest, auth AuthConfig) (string, bool, error)
func (*Client) CommitDiff ¶
func (*Client) DirectoryHistory ¶
func (*Client) FileExists ¶
func (*Client) GetCurrentCommit ¶
func (*Client) ListBranches ¶
func (c *Client) ListBranches(ctx context.Context, url string, auth AuthConfig) ([]BranchInfo, error)
func (*Client) ProbeRemote ¶
func (*Client) PurgeScratchDirs ¶
func (*Client) RemoteBranchHead ¶
func (*Client) TestConnection ¶
func (*Client) WalkDirectory ¶
type CollectOptions ¶
type CommitFile ¶
func CollectFiles ¶
func CollectFiles(ctx context.Context, root string, selection []string, opts CollectOptions) ([]CommitFile, error)
type CommitIdentity ¶
type CommitRequest ¶
type DirectoryWalkResult ¶
type DirectoryWalkResult struct {
Files []SyncFileInfo
TotalFiles int
TotalSize int64
SkippedBinaries int
}
type HistoryEntry ¶
type SyncFileInfo ¶
Click to show internal directories.
Click to hide internal directories.