baccounts

package
v0.0.0-...-ea5ce41 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.1.0"

Variables

This section is empty.

Functions

func ReadPassword

func ReadPassword(msg string) (string, error)

func ShowKeys

func ShowKeys(keyfile string) error

Types

type Baccount

type Baccount struct {
	Profiles    []*Profile
	DefaultMail string // Used for private key seek
	Version     string
	ReadOnly    bool
}

func LoadAccounts

func LoadAccounts() (*Baccount, string, error)

func LoadKeys

func LoadKeys(datafile string) (*Baccount, error)

func (*Baccount) AddProfile

func (b *Baccount) AddProfile(name, datafile string) error

func (*Baccount) GetDefault

func (b *Baccount) GetDefault() (*Profile, error)

func (*Baccount) GetProfile

func (b *Baccount) GetProfile(name string) (*Profile, error)

func (*Baccount) List

func (b *Baccount) List() error

func (*Baccount) Show

func (b *Baccount) Show(site *Site) subcommands.ExitStatus

func (*Baccount) Update

func (b *Baccount) Update(name, site, datafile string) error

func (*Baccount) UpdateConfigFile

func (b *Baccount) UpdateConfigFile(dest string) error

type Coder

type Coder struct {
	// contains filtered or unexported fields
}

func NewCoder

func NewCoder() *Coder

func NewTestCoder

func NewTestCoder() *Coder

func (*Coder) Decode

func (coder *Coder) Decode(txt string) (string, error)

func (*Coder) Encode

func (coder *Coder) Encode(txt string, id int) (string, error)

func (*Coder) HasPubKey

func (coder *Coder) HasPubKey(id int) bool

func (*Coder) PublicKeyringFile

func (coder *Coder) PublicKeyringFile() string

func (*Coder) SecretKeyringFile

func (coder *Coder) SecretKeyringFile() string

func (*Coder) SetPassphrase

func (coder *Coder) SetPassphrase()

type Profile

type Profile struct {
	// This mail address corresponds to login info
	Name    string
	Sites   map[string]*Site
	Default bool
}

func NewProfile

func NewProfile(mail string, dflt bool) *Profile

func (*Profile) AddSite

func (profile *Profile) AddSite(domain, url, name, encpass, mail string) error

func (*Profile) FindSite

func (p *Profile) FindSite(urlPattern string) (*Site, error)

func (*Profile) SetDefault

func (profile *Profile) SetDefault(b bool)

func (*Profile) UpdateSite

func (p *Profile) UpdateSite(urlPattern, encpass string) error

type Site

type Site struct {
	Url         string
	Name        string
	EncodedPass string
	Mail        string
}

Jump to

Keyboard shortcuts

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