Documentation ¶
Index ¶
- func FileStatus(name string) (string, error)
- func FindConfigDir(reporoot, team string) (string, error)
- func PrettyCommitMessage(verb string, files []string) string
- type Box
- func (bx *Box) AdminAdd(nom string, sdir string) error
- func (bx *Box) AdminList() error
- func (bx *Box) AdminRemove([]string) error
- func (bx *Box) Cat(names []string) error
- func (bx *Box) Decrypt(names []string, overwrite bool, bulkpause bool, setgroup string) error
- func (bx *Box) Diff([]string) error
- func (bx *Box) Edit(names []string) error
- func (bx *Box) Encrypt(names []string, shred bool) error
- func (bx *Box) FileAdd(names []string, shred bool) error
- func (bx *Box) FileList() error
- func (bx *Box) FileRemove(names []string) error
- func (bx *Box) Info() error
- func (bx *Box) Init(yes, vcsname string) error
- func (bx *Box) Reencrypt(names []string, overwrite bool, bulkpause bool) error
- func (bx *Box) Shred(names []string) error
- func (bx *Box) Status(names []string, nameOnly bool, match string) error
- func (bx *Box) TestingInitRepo() error
- type StatusMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileStatus ¶
FileStatus returns the status of a file.
func FindConfigDir ¶
FindConfigDir tests various places until it finds the config dir. If we can't determine the relative path, "" is returned.
func PrettyCommitMessage ¶
PrettyCommitMessage generates a pretty commit message.
Types ¶
type Box ¶
type Box struct { // Paths: Team string // Name of the team (i.e. .blackbox-$TEAM) RepoBaseDir string // Rel path to the VCS repo. ConfigPath string // Abs or Rel path to the .blackbox (or whatever) directory. ConfigRO bool // True if we should not try to change files in ConfigPath. // Settings: Umask int // umask to set when decrypting Editor string // Editor to call Debug bool // Are we in debug logging mode? // Cache of data gathered from .blackbox: Admins []string // If non-empty, the list of admins. Files []string // If non-empty, the list of files. FilesSet map[string]bool // If non-nil, a set of Files. // Handles to interfaces: Vcs vcs.Vcs // Interface access to the VCS. Crypter crypters.Crypter // Inteface access to GPG. // contains filtered or unexported fields }
Box describes what we know about a box.
func NewForTestingInit ¶
NewForTestingInit creates a box in a bare environment.
func NewFromFlags ¶
func NewFromFlags(c *cli.Context) *Box
NewFromFlags creates a box using items from flags. Nearly all subcommands use this.
func NewUninitialized ¶
func NewUninitialized(c *cli.Context) *Box
NewUninitialized creates a box in a pre-init situation.
func (*Box) AdminRemove ¶
AdminRemove removes an id from the admin list.
func (*Box) FileRemove ¶
FileRemove de-enrolls files.
func (*Box) TestingInitRepo ¶
TestingInitRepo initializes a repo. Uses bx.Vcs to create ".git" or whatever. Uses bx.Vcs to discover what was created, testing its work.
type StatusMode ¶
type StatusMode int
StatusMode is a type of query.
const ( // Itemized is blah Itemized StatusMode = iota // Individual files by name // All files is blah All // Unchanged is blah Unchanged // Changed is blah Changed )