models

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserIDToString

func UserIDToString(id interface{}) string

Types

type Context

type Context struct {
	Service     userGetter
	EchoContext echo.Context
}

func (*Context) GetCurrentUser

func (c *Context) GetCurrentUser() *User

type LazyUserFn

type LazyUserFn func() *User

func LazyUser

func LazyUser(f func() *User) LazyUserFn

type Social

type Social struct {
	Provider string `json:"provider" bson:"provider"`
	Name     string `json:"name" bson:"name"`
	Email    string `json:"email" bson:"email"`
	PhotoURL string `json:"photoURL" bson:"photoURL"`
	SocialID string `json:"socialID" bson:"socialID"`
}

type User

type User struct {
	ID       interface{}        `json:"_id" bson:"_id,omitempty"`
	Social   map[string]*Social `json:"social" bson:"social"`
	Email    string             `json:"email" bson:"email"`
	Name     string             `json:"name" bson:"name"`
	PhotoURL string             `json:"photoURL" bson:"photoURL"`
}

Jump to

Keyboard shortcuts

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