user

package
v0.0.0-...-0e3259e Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package user deletes, updates and returns an user.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(s *session.Session) (*user.User, error)

Get tries to return logged user from the memcache first, if fails, tries to return logged user's datastore key from the memcache and then gets the logged user via that key from the datastore. Finally, if both atemps above fails, tries to get logged user via user's email which stores in the session struct. And also returns an error. In adition to those, adds one or both of the logged user and the logged user's key to the memcache if they are apsent.

func Handler

func Handler(s *session.Session)

Handler updates and returns user via user ID which is an encoded key if provided otherwise returns logged user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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