command

package
v0.0.0-...-4cb31fb Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately.

Types

type GoogleAuth

type GoogleAuth struct {
	// contains filtered or unexported fields
}

func NewGoogleAuth

func NewGoogleAuth(user string, options ...Option) *GoogleAuth

func (*GoogleAuth) Authenticate

func (g *GoogleAuth) Authenticate(code string) (ok bool, err error)

Authenticate 生成验证code正确

func (*GoogleAuth) GenerateKey

func (g *GoogleAuth) GenerateKey() string

GenerateKey 生成密钥

func (*GoogleAuth) GetCode

func (g *GoogleAuth) GetCode() (code string, err error)

func (*GoogleAuth) ProvisionURI

func (g *GoogleAuth) ProvisionURI() (codeUrl string)

ProvisionURI 生成url

type Item

type Item struct {
	XMLName      xml.Name `xml:"item"`
	Autocomplete xml.Attr `xml:"autocomplete,attr"`
	Valid        string   `xml:"valid,attr"`
	Arg          string   `xml:"arg,attr"`
	Title        string   `xml:"title"`
	Subtitle     string   `xml:"subtitle"`
	Icon         string   `xml:"icon"`
	Text         struct {
		XMLName  xml.Name `xml:"text"`
		TextType xml.Attr `xml:"type,attr"`
		Content  string   `xml:",innerxml"`
	} `xml:"text"`
}

type Option

type Option func(o *GoogleAuth)

func IssuerOption

func IssuerOption(issuer string) Option

func SecretOption

func SecretOption(s string) Option

type XmlItems

type XmlItems struct {
	XMLName xml.Name `xml:"items"`
	Iterm   []Item   `xml:"item"`
}

Jump to

Keyboard shortcuts

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