cli

package
v6.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthOpts = options.AuthOptions{
	Username:      "",
	Password:      "",
	PasswordStdin: false,
	ConfirmLogout: false,
}
View Source
var CreateCMD = &cobra.Command{
	Use:   "create",
	Short: "Create a new secman account.",
	Long:  "Create a new secman account at https://auth.secman.dev",
	RunE: func(cmd *cobra.Command, args []string) error {
		err := browser.OpenURL("https://auth.secman.dev")

		if err != nil {
			fmt.Printf("could not open browser: %s\n", err)

			os.Exit(2)
		}

		return nil
	},
}
View Source
var DocsCMD = &cobra.Command{
	Use:   "docs",
	Short: "Open Secman documentation in default browser.",
	Long:  "Open Secman documentation in default browser.",
	Run: func(cmd *cobra.Command, args []string) {
		err := browser.OpenURL("https://secman.dev/docs")

		if err != nil {
			fmt.Printf("could not open browser: %s\n", err)

			os.Exit(2)
		}
	},
}
View Source
var EncryptOpts = options.EncryptOptions{
	AES:    false,
	SHA256: false,
	SHA512: false,
	MD5:    false,
	AESKey: "",
}
View Source
var GenOpts = options.GenOptions{
	Length: 10,
	Raw:    false,
}
View Source
var InitCMD = &cobra.Command{
	Use:   "init",
	Short: "Initialize ~/.secman .",
	Long:  "Initialize ~/.secman .",
	RunE: func(cmd *cobra.Command, args []string) error {
		initx.Init()

		return nil
	},
}
View Source
var PwOpts = options.PasswordsOptions{
	Password:     "",
	Logins:       false,
	CreditCards:  false,
	Emails:       false,
	Notes:        false,
	Servers:      false,
	ShowHidden:   false,
	ShowJsonView: false,
	ShowTreeView: false,
	AutoGenerate: false,
}
View Source
var RefreshCMD = &cobra.Command{
	Use:   "refresh",
	Short: "Refresh the current user account.",
	Long:  "Refresh the current user account. This will invalidate the current access token.",
	RunE: func(cmd *cobra.Command, args []string) error {
		if err := tea.NewProgram(refresh.Refresh()).Start(); err != nil {
			fmt.Printf("could not start program: %s\n", err)
			os.Exit(2)
		}

		return nil
	},
}
View Source
var UIOpenCMD = &cobra.Command{
	Use:     "open",
	Aliases: []string{"."},
	Short:   "Open Secman UI in default browser.",
	Long:    "Open Secman UI in default browser.",
	Run: func(cmd *cobra.Command, args []string) {
		ui.Open()
	},
}
View Source
var UIUpdateCMD = &cobra.Command{
	Use:   "update",
	Short: "Update SMUI to latest version.",
	Long:  "Update SMUI to latest version.",
	Run: func(cmd *cobra.Command, args []string) {
		ui.Update()
	},
}
View Source
var WhoamiOpts = options.WhoamiOptions{
	ShowUser: false,
}

Functions

func AuthCMD

func AuthCMD() *cobra.Command

func DeleteCMD

func DeleteCMD() *cobra.Command

func EditCMD

func EditCMD() *cobra.Command

func EncryptCMD

func EncryptCMD() *cobra.Command

func FilesCMD

func FilesCMD() *cobra.Command

func FilesReceiveCMD

func FilesReceiveCMD() *cobra.Command

func FilesSendCMD

func FilesSendCMD() *cobra.Command

func GenerateCMD

func GenerateCMD() *cobra.Command

func InfoCMD

func InfoCMD(version string) *cobra.Command

func InsertCMD

func InsertCMD() *cobra.Command

func ListCMD

func ListCMD() *cobra.Command

func LoginCMD

func LoginCMD() *cobra.Command

func LogoutCMD

func LogoutCMD() *cobra.Command

func ReadCMD

func ReadCMD() *cobra.Command

func UICMD

func UICMD() *cobra.Command

func WhoamiCMD

func WhoamiCMD() *cobra.Command

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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