token

package
v0.0.0-...-2a6e696 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Expires time.Duration
	Secret  string
}

func New

func New(expire int, secret string) *Token

func (*Token) CreateToken

func (t *Token) CreateToken(UserID string) (string, error)

func (*Token) GetToken

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

Jump to

Keyboard shortcuts

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