diff

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BackupDIR = "./bkup1/"

BackupDIR is where the backup databases are

Variables

View Source
var Cmd = &cli.Command{
	Name:    "diff",
	Usage:   "diff entries between 2 kdbx databases",
	Aliases: []string{"d"},
	Description: `Show difference between 2 kdbx databases

syntax:
	kpcli \
		--keyfile <keyfile> \
		--database <database-filename> \
		--pass "${KDBX_PASSWORD}" \
		diff \
			--database2 <database-filename-2>

example:
	kpcli \
		--keyfile ${KDBX_KEYFILE} \
		--database ${KDBX_PASSWORD} \
		--pass "${KDBX_PASSWORD}" \
		diff \
			--database2 ${DATABASE_BACKUP}
	`,

	Action: cmd,
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:    "database2",
			Usage:   "kdbx files fullpath2",
			Aliases: []string{"db2", "dbfile2"},
			EnvVars: []string{"KDBX_DATABASE2"},
		},

		&cli.StringFlag{
			Name:    "output-format",
			Usage:   "Output format; available: table, csv, markdown, html",
			Aliases: []string{"of2"},
		},
		&cli.BoolFlag{
			Name:    "notify",
			Usage:   "notify with email",
			Aliases: []string{"n"},
		},
	},
}

Functions

This section is empty.

Types

type Diff

type Diff struct {
	ToDBOption   *ls.Options
	FromDBOption *ls.Options
	// contains filtered or unexported fields
}

func NewDiff

func NewDiff(opts Options) *Diff

NewDiff returns a *Diff

func (*Diff) Diff

func (d *Diff) Diff() error

Diff shows the difference between 2 databases notify option can be used to notify your email id (work only for gmail at the moment)

func (*Diff) Notify

func (d *Diff) Notify(contentFile string)

type Options

type Options struct {
	Database       string
	Database2      string
	Key            string
	Notify         bool
	OutputFilename string
	OutputFormat   string
	Pass           string
}

Jump to

Keyboard shortcuts

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