users

package
v0.0.0-...-dfa43ee Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(login, password, name, email string, isSuperuser bool) error

func Delete

func Delete(userID int32) error

func List

func List(limit, offset int32, query string) (*list, error)

func Update

func Update(userID int32, name, email string, isSuperuser bool) error

Types

type User

type User struct {
	ID          int32     `db:"user_id"      json:"user_id"`
	Name        string    `db:"user_name"    json:"user_name"`
	Login       string    `db:"user_login"   json:"user_login"`
	Email       string    `db:"user_email"   json:"user_email"`
	IsSuperuser bool      `db:"is_superuser" json:"is_superuser"`
	CreatedAt   time.Time `db:"created_at"   json:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"   json:"updated_at"`
}

func Get

func Get(userID int32) (User, error)

type Users

type Users []User

func (*Users) Scan

func (u *Users) Scan(src interface{}) error

Jump to

Keyboard shortcuts

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