models

package
v0.16.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID          uint   `json:"id" gorm:"primaryKey"`
	AccountName string `json:"accountName" binding:"required"`
	Username    string `json:"username"`
	SecretKey   string `json:"secretKey" binding:"required"`
	Mode        string `json:"mode"`
	Base32      bool   `json:"base32"`
	Hash        string `json:"hash"`
	ValueLength int    `json:"length"`
	Counter     int64  `json:"counter"`
	Epoch       int64  `json:"epoch"`
	Interval    int64  `json:"interval"`
}

func (Account) OTP

func (a Account) OTP() (code string, err error)

otp generate one-time password code

Jump to

Keyboard shortcuts

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