auth

package
v0.0.0-...-b7604bf Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(id uint) (string, error)

GenerateToken generates a new token

func GenerateTokenWithTime

func GenerateTokenWithTime(id uint, t time.Time) (string, error)

GenerateTokenWithTime generates a new token with expired date computed withspecified time

func GetUserID

func GetUserID(ctx context.Context) (uint, error)

GetUserID gets user id string from request context

Types

This section is empty.

Jump to

Keyboard shortcuts

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