user

package
v0.0.0-...-9b40155 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Add

func Add(email, language string, subscribed bool) (err error)

New creates a new user and attempts to add it to the database

func AnonymousUserID

func AnonymousUserID() string

func GetID

func GetID(email string) (userID string, err error)

func Update

func Update(id, email, language string, subscribed bool) (err error)

func UserExists

func UserExists(id string) bool

Types

type User

type User struct {
	ID         string `storm:"unique"` // primary key
	Email      string `storm:"unique"` // this field will be indexed with a unique constraint
	Language   string
	Subscribed bool
	Joined     time.Time
}

func All

func All() (u []User, err error)

func Get

func Get(id string) (u User, err error)

Get returns the User object for the specified email

Jump to

Keyboard shortcuts

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