pass

package module
v0.0.0-...-1cd2a52 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 9 Imported by: 1

README

go-pass

Package pass provides a Go API for pass, the standard UNIX password manager (http://passwordstore.org).

Docs

https://pkg.go.dev/github.com/littleroot/go-pass

Documentation

Overview

Package pass provides a Go API for pass, the standard UNIX password manager (http://passwordstore.org).

The API of the package aims to be close to each of the subcommands of the pass program. See the doc comments on each function for details and differences. Some of the subcommands are omitted from the API since I don't have a need for them currently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(ctx context.Context, oldPath, newPath string, force bool, opts *Options) error

Copy is equivalent to the "cp" subcommand.

func Git

func Git(ctx context.Context, gitArgs []string, opts *Options) error

Git is equivalent to the "git" subcommand.

func Init

func Init(ctx context.Context, gpgID, subfolder string, opts *Options) error

Init is equivalent to the "init" subcommand.

func Insert

func Insert(ctx context.Context, name string, content []byte, force bool, opts *Options) error

Insert is equivalent to the "insert" subcommand.

func List

func List(ctx context.Context, subfolder string, opts *Options) ([]string, error)

List is equivalent to the "ls" subcommand.

Unlike the original subcommand, this function does not follow and list the contents of symbolic links.

func Move

func Move(ctx context.Context, oldPath, newPath string, force bool, opts *Options) error

Move is equivalent to the "mv" subcommand.

func Remove

func Remove(ctx context.Context, name string, recursive, force bool, opts *Options) error

Remove is equivalent to the "rm" subcommand.

func Show

func Show(ctx context.Context, name, gpgPassphrase string, opts *Options) ([]byte, error)

Show is equivalent to the "show" subcommand. Unlike the original subcommand, Show only works for showing the content of password files (ending in .gpg) and not for listing the content of directories. Use List to list the content of directories.

Types

type Options

type Options struct {
	StoreDir string //  Optional. The value of PASSWORD_STORE_DIR.
}

Jump to

Keyboard shortcuts

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