Documentation ¶
Index ¶
- func Add(cmd *AddCmd, keys keyrings.Keys) (string, error)
- func AddMigration(migrationUri string, keys keyrings.Keys) (string, error)
- func Code(cmd *CodeCmd, keys keyrings.Keys) (string, error)
- func Copy(cmd *CopyCmd, keys keyrings.Keys) (string, error)
- func Decode(cmd *DecodeCmd) (string, error)
- func Gen(cmd *GenCmd) (string, error)
- func IsMigrationUri(uri string) bool
- func List(cmd *ListCmd, keys keyrings.Keys) (string, error)
- func Remove(cmd *RemoveCmd, keys keyrings.Keys) (string, error)
- func ScanQrCode(cmd *ScanCmd) (string, error)
- func SetCounter(cmd *SetCounterCmd, keys keyrings.Keys) (string, error)
- func View(cmd *ViewCmd, keys keyrings.Keys) (string, error)
- type AddCmd
- type CodeCmd
- type CopyCmd
- type DecodeCmd
- type GenCmd
- type ListCmd
- type RemoveCmd
- type ScanCmd
- type SetCounterCmd
- type ViewCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMigrationUri ¶
func ScanQrCode ¶
func SetCounter ¶
func SetCounter(cmd *SetCounterCmd, keys keyrings.Keys) (string, error)
Types ¶
type AddCmd ¶
type AddCmd struct { Uri string `arg:"positional,required"` Name string `arg:"--name" help:"Optional name of the code to refer to it later"` IsCode bool `arg:"--code" help:"Pass just secret code instead of full URI"` Hash string `arg:"--hash" help:"Hash algorithm SHA-1, SHA-256 or SHA-512" choice:"SHA-1" choice:"SHA-256" choice:"SHA-512"` }
type GenCmd ¶ added in v0.1.2
type GenCmd struct { Key string `arg:"--key" help:"Base32-encoded secret key" required:"true"` Hash string `arg:"--hash" help:"Hash algorithm SHA-1, SHA-256 or SHA-512" choice:"SHA-1" choice:"SHA-256" choice:"SHA-512" default:"SHA-1"` Digits int `arg:"--digits" help:"Number of digits in the code, 6-10" default:"6"` Period uint `arg:"--period" help:"TOTP code rotation period, default is 30 seconds" default:"30"` }
type RemoveCmd ¶
type RemoveCmd struct {
Name string `arg:"positional,required" help:"Name of the code to remove"`
}
type SetCounterCmd ¶
Click to show internal directories.
Click to hide internal directories.