utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeMessage

func DecodeMessage(buffer []byte) (*migrationpayload.MigrationPayload, error)

func DecodeQRImage

func DecodeQRImage(flags Flags) (string, error)

func GenerateURL

func GenerateURL(issuer, name, secret, othType string) string

func OutputQRImage

func OutputQRImage(outputResult []OutputResult, flags Flags)

func OutputToCSV

func OutputToCSV(outputResult []OutputResult, flags Flags)

func OutputToJSON

func OutputToJSON(outputResult []OutputResult, flags Flags)

func OutputToTxt

func OutputToTxt(outputResult []OutputResult, flags Flags)

func OutputToURL

func OutputToURL(outputResult []OutputResult, flags Flags)

func PrintOTPCodes

func PrintOTPCodes(outputResult []OutputResult, flags Flags)

Types

type Flags

type Flags struct {
	Input   string
	Csv     string
	Json    string
	Text    string
	QrDir   string
	Url     string
	Version bool
	PrintQR bool
	Debug   bool
	Silent  bool
}

type OutputResult

type OutputResult struct {
	Issuer  string `json:"issuer"`
	Name    string `json:"name"`
	Secret  string `json:"secret"`
	Type    string `json:"type"`
	Counter int64  `json:"counter"`
	URL     string `json:"url"`
}

func GenerateResult

func GenerateResult(payload *migrationpayload.MigrationPayload) []OutputResult

Jump to

Keyboard shortcuts

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