sync

package
v0.0.0-...-993c130 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewCmdStart = &cobra.Command{
		Use:     "start",
		Aliases: []string{"go", "."},
		Example: "secman sync start",
		Short:   "Start Sync your passwords.",
		Run: func(cmd *cobra.Command, args []string) {
			if username != ":username" {
				exCmd := commands.StartEX()

				shell.SHCore(commands.Start_ml(), commands.Start_w())
				shell.SHCore(exCmd, exCmd)
			} else {
				shared.AuthMessage()
			}
		},
	}

	NewCmdClone = &cobra.Command{
		Use:     "clone",
		Aliases: []string{"cn", "/"},
		Short:   CloneHelp(),
		Run: func(cmd *cobra.Command, args []string) {
			if username != ":username" {
				cloneCmd := commands.Clone()

				shell.SHCore(cloneCmd, cloneCmd)
				shell.SHCore(commands.Clone_check_ml(), commands.Clone_check_w())
			} else {
				shared.AuthMessage()
			}
		},
	}

	NewCmdPush = &cobra.Command{
		Use:     "push",
		Aliases: []string{"ph"},
		Short:   "Push The New Passwords in ~/.secman .",
		Run: func(cmd *cobra.Command, args []string) {
			if username != ":username" {
				shell.SHCore(commands.Push_ml(), commands.Push_w())
			} else {
				shared.AuthMessage()
			}
		},
	}

	NewCmdPull = &cobra.Command{
		Use:     "pull",
		Aliases: []string{"pl"},
		Short:   PullHelp(),
		Run: func(cmd *cobra.Command, args []string) {
			if username != ":username" {
				shell.SHCore(commands.Pull_ml(), commands.Pull_w())
			} else {
				shared.AuthMessage()
			}
		},
	}

	FetchClone = &cobra.Command{
		Use:   "pull",
		Short: PullHelp(),
		Run: func(cmd *cobra.Command, args []string) {
			if username != ":username" {
				if runtime.GOOS == "windows" {
					shell.PWSLCmd(commands.Clone())
				} else {
					fmt.Println("This command isn't avaliable for this platform")
				}
			} else {
				shared.AuthMessage()
			}
		},
	}
)

Functions

func CloneHelp

func CloneHelp() string

func PullHelp

func PullHelp() string

func PushSync

func PushSync()

func Sync

func Sync() *cobra.Command

func SyncHelp

func SyncHelp() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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