models

package
v0.0.0-...-412af48 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypter

type Crypter interface {
	// Name returns the plug-in's canonical name.
	Name() string
	// Decrypt name+".gpg", possibly overwriting name.
	Decrypt(filename string, umask int, overwrite bool) error
	// Encrypt name, overwriting name+".gpg"
	Encrypt(filename string, umask int, receivers []string) (string, error)
	// Cat outputs a file, unencrypting if needed.
	Cat(filename string) ([]byte, error)
	// AddNewKey extracts keyname from sourcedir's GnuPG chain to destdir keychain.
	AddNewKey(keyname, repobasename, sourcedir, destdir string) ([]string, error)
}

Crypter is gpg binaries, go-opengpg, etc.

type Vcs

type Vcs interface {
	// Name returns the plug-in's canonical name.
	Name() string
	// Discover returns true if we are a repo of this type; along with the Abs path to the repo root (or "" if we don't know).
	Discover() (bool, string)

	// SetFileTypeUnix informs the VCS that files should maintain unix-style line endings.
	SetFileTypeUnix(repobasedir string, files ...string) error
	// IgnoreAnywhere tells the VCS to ignore these files anywhere in the repo.
	IgnoreAnywhere(repobasedir string, files []string) error
	// IgnoreAnywhere tells the VCS to ignore these files, rooted in the base of the repo.
	IgnoreFiles(repobasedir string, files []string) error

	// CommitTitle sets the title of the next commit.
	CommitTitle(title string)
	// NeedsCommit queues up commits for later execution.
	NeedsCommit(message string, repobasedir string, names []string)
	// DebugCommits dumps a list of future commits.
	DebugCommits() commitlater.List
	// FlushCommits informs the VCS to do queued up commits.
	FlushCommits() error

	// TestingInitRepo initializes a repo of this type (for use by integration tests)
	TestingInitRepo() error
}

Vcs is git/hg/etc.

Jump to

Keyboard shortcuts

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