token

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(username string, duration int, ip string, context interface{}) (string, error)

func DeleteToken

func DeleteToken(token string, context interface{}) error

func RenewToken

func RenewToken(token string) error

Types

type Token

type Token struct {
	Token    string `json:"token"`
	Username string `json:"username"`
	Ip       string `json:"ip"`
	Duration int    `json:"duration"`
	Time     string `json:"time"`
}

func GetToken

func GetToken(token string) (*Token, error)

func GetTokenList

func GetTokenList() ([]*Token, error)

Jump to

Keyboard shortcuts

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