persistent

package
v1.7.1-0...-092312a Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserStoreFirestore

func NewUserStoreFirestore() (persistent.UserStore, error)

NewUserStoreFirestore creates an instance of user store backed by Firestore

Types

type FirestoreUserStore

type FirestoreUserStore struct {
	// contains filtered or unexported fields
}

FirestoreUserStore that uses Firestore as the backend

func (FirestoreUserStore) CreateSession

func (s FirestoreUserStore) CreateSession(email string, accessToken string) error

CreateSession create a new session for the user

func (FirestoreUserStore) GetSessions

func (s FirestoreUserStore) GetSessions(email string) (*[]models.AuthSession, *persistent.User, error)

GetSessions of a user from the store

func (FirestoreUserStore) Login

func (s FirestoreUserStore) Login(email string, password string) (*[]models.AuthSession, error)

Login and gets sessions linked to the user

func (FirestoreUserStore) Logout

func (s FirestoreUserStore) Logout(sessionIDs ...string) error

Logout and clear the sessions

func (FirestoreUserStore) SetToken

func (s FirestoreUserStore) SetToken(sessionID string, accessToken string) error

SetToken update a sesion with a new token

Jump to

Keyboard shortcuts

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