admin

package
v0.0.0-...-b95dbb3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Admins db.Bucket = "admin-admins"
	Emails db.Bucket = "admin-emails"
)

Variables

This section is empty.

Functions

func Buckets

func Buckets() []db.Bucket

Buckets gets the Buckets for admin.

func Create

func Create(d db.DB, email, pwhash string) (util.Key, error)

Create makes a new Admin account with a given email and pwhash.

func Delete

func Delete(d db.DB, key util.Key) error

Delete deletes the admin which has the given key.

func DeleteByEmail

func DeleteByEmail(d db.DB, email string) error

DeleteByEmail deletes the admin which has the given email.

func IsAdmin

func IsAdmin(d db.DB, key util.Key) error

IsAdmin returns nil if there exists an Admin for the given util.Key.

func IsAdminEmail

func IsAdminEmail(d db.DB, email string) error

IsAdminEmail returns nil if there exists an Admin for the given email.

Types

type Admin

type Admin user.User

Admin is a user as considered by the admin package.

func Get

func Get(d db.DB, key util.Key) (*Admin, error)

Get retrieves an *Admin from the database for a given key.

func GetByEmail

func GetByEmail(d db.DB, email string) (*Admin, error)

GetByEmail retrieves an *Admin from the database for a given email.

Jump to

Keyboard shortcuts

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