session

package
v0.0.0-...-6362154 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSessionNotFound = errors.New("session not found")

Functions

func GetUserId

func GetUserId(ctx context.Context, accessToken string) (userId string, err error)

Types

type Session

type Session struct {
	AccessToken string    `json:"access_token"`
	UserId      string    `json:"user_id"`
	Expiration  time.Time `json:"expiration"`
}

func GetSession

func GetSession(ctx context.Context, userId string) (session Session, err error)

func NewSession

func NewSession(ctx context.Context, userId string) (session Session, err error)

Jump to

Keyboard shortcuts

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