Back to godoc.org

Package account

v0.0.0-...-c433275
Latest Go to latest

The latest major version is .

Published: Nov 2, 2019 | License: MIT | Module: github.com/flyin/tic-tac-toe/server

Index

Constants

const SessionKey = "session"
const UserContextKey = "user"

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)
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier