login

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidType = fmt.Errorf("not a valid Type, try [%s]", strings.Join(_TypeNames, ", "))

Functions

func Code added in v0.2.0

func Code(ctx context.Context) error

func Desktop added in v0.2.0

func Desktop(ctx context.Context, opts Options) error

func QR added in v0.14.0

func QR(ctx context.Context) error

func Run

func Run(ctx context.Context, opts Options) error

func TypeNames added in v0.14.0

func TypeNames() []string

TypeNames returns a list of possible string values of Type.

Types

type Options added in v0.8.0

type Options struct {
	Type     Type
	Desktop  string
	Passcode string
}

type Type added in v0.14.0

type Type int

Type ENUM(desktop, code, qr)

const (
	// TypeDesktop is a Type of type Desktop.
	TypeDesktop Type = iota
	// TypeCode is a Type of type Code.
	TypeCode
	// TypeQr is a Type of type Qr.
	TypeQr
)

func ParseType added in v0.14.0

func ParseType(name string) (Type, error)

ParseType attempts to convert a string to a Type.

func TypeValues added in v0.14.0

func TypeValues() []Type

TypeValues returns a list of the values for Type

func (*Type) Get added in v0.14.0

func (x *Type) Get() interface{}

Get implements the Golang flag.Getter interface func.

func (Type) IsValid added in v0.14.0

func (x Type) IsValid() bool

IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values

func (*Type) Set added in v0.14.0

func (x *Type) Set(val string) error

Set implements the Golang flag.Value interface func.

func (Type) String added in v0.14.0

func (x Type) String() string

String implements the Stringer interface.

func (*Type) Type added in v0.14.0

func (x *Type) Type() string

Type implements the github.com/spf13/pFlag Value interface.

Jump to

Keyboard shortcuts

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