account

package
v0.0.0-...-c433275 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SessionKey = "session"
View Source
const UserContextKey = "user"

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Exchangers     map[string]exchangerCreatorFn
	UserContextKey string
	MongoClient    *mongo.Client
	FrontendURL    string
}

func NewService

func NewService(client *mongo.Client) *Service

func (*Service) GetCurrentUser

func (s *Service) GetCurrentUser(c echo.Context) *models.User

func (*Service) GetExchanger

func (s *Service) GetExchanger(session auth.Session, name string) (auth.Exchanger, error)

func (*Service) GetSession

func (s *Service) GetSession(c echo.Context) *session.Session

func (*Service) GetStorage

func (s *Service) GetStorage(c echo.Context) Storage

type Storage

type Storage interface {
	AssociateSocial(socialUser *models.Social) (*models.User, error)
	GetUser(id string) (*models.User, error)
}

Directories

Path Synopsis
vk

Jump to

Keyboard shortcuts

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