devereux

package
v0.0.0-...-1974576 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2016 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BASE_PATH = path.Join(os.Getenv("HOME"), ".devereux/")
View Source
var BOUNDARY_BYTES = []byte("私のホバークラフトは鰻でいっぱいです")
View Source
var CONFIG_PATH = path.Join(BASE_PATH, "config.yaml")
View Source
var DEBUG = true
View Source
var MIN_REPO_BYTE_LENGTH = 5 * int(math.Pow(10, float64(6)))
View Source
var REPO_PATH = path.Join(BASE_PATH, "repos/")

Functions

func CreateRepository

func CreateRepository(name string, setAsDefault bool, key string) (string, error)

func Debugf

func Debugf(format string, args ...interface{})

func DeleteRepository

func DeleteRepository(name string) error

func GetPassword

func GetPassword(passwordName string, repoName string, key string) (string, error)

func GetRepositories

func GetRepositories() ([]string, error)

func SetPassword

func SetPassword(passwordName string, repoName string, key string, password string) error

Types

type Config

type Config struct {
	CurrentRepository string `yaml:"current_repository"`
}

func (*Config) Save

func (c *Config) Save(configPath string) error

type PasswordEntry

type PasswordEntry struct {
	Name     string `yaml:"name"`
	Password string `yaml:"password"`
}

type Repository

type Repository struct {
	Name    string          `yaml:"name"`
	Entries []PasswordEntry `yaml:"entries"`
	// contains filtered or unexported fields
}

func (*Repository) Create

func (r *Repository) Create(key string, setAsDefault bool, configPath string) error

func (*Repository) Delete

func (r *Repository) Delete() error

func (*Repository) GetPassword

func (r *Repository) GetPassword(passwordName string, key string) (string, error)

func (*Repository) LoadFromFile

func (r *Repository) LoadFromFile(key string) error

func (*Repository) SetPassword

func (r *Repository) SetPassword(passwordName string, password string, key string) error

func (*Repository) WriteToFile

func (r *Repository) WriteToFile(key string) error

Jump to

Keyboard shortcuts

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