authtoken

package
v0.0.0-...-bb03a27 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(n int) error

func IsValidToken

func IsValidToken(token string) (bool, error)

func MarkUsed

func MarkUsed(token string) (bool, error)

func PopToken

func PopToken() (string, error)

Types

type AuthToken

type AuthToken struct {
	gorm.Model
	AuthToken    string `gorm:"index:idx_authtoken,unique,column:auth_token"`
	ValidState   bool   `gorm:"column:valid_state"`
	UserAssigned bool   `gorm:"column:user_assigned"`
	Permanent    bool   `gorm:"column:permanent"`
}

Jump to

Keyboard shortcuts

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