user

package
v0.0.0-...-5201481 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(t repo.Tx) error

Create creates a new User Table on the cassandra cluster

func Insert

func Insert(t repo.Tx, u *Model) error

Insert creates a given User

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model defines a user

func New

func New(username, password, email, firstName, lastName string, authLevel uint8) (*Model, error)

New creates a new Model from arguments

func NewAdmin

func NewAdmin(username, password, email, firstName, lastName string) (*Model, error)

NewAdmin creates a new Administrator

func NewModel

func NewModel() *Model

NewModel creates a new Model

func NewSuperUser

func NewSuperUser(username, password string) (*Model, error)

NewSuperUser creates a new superuser

func NewUser

func NewUser(username, password, email, firstName, lastName string) (*Model, error)

NewUser creates a new User with default access level

func Select

func Select(t repo.Tx, userid string) (*Model, error)

Select finds a given User based on ID

func SelectByUsername

func SelectByUsername(t repo.Tx, username string) (*Model, error)

SelectByUsername finds a given User based on username

func (*Model) GetPrivate

func (m *Model) GetPrivate() *ModelPrivate

GetPrivate returns the portion of the Model that is public and private

func (*Model) GetPublic

func (m *Model) GetPublic() *ModelPublic

GetPublic returns the portion of the Model that is public

type ModelPrivate

type ModelPrivate struct {
	ID string `json:"id"`
	// contains filtered or unexported fields
}

ModelPrivate defines the public and private properties of a user

type ModelPublic

type ModelPublic struct {
	ID string `json:"id"`
	// contains filtered or unexported fields
}

ModelPublic defines the public properties of a user

type UnameMap

type UnameMap struct {
	// contains filtered or unexported fields
}

UnameMap maps a username to a user ID

func NewUnameMap

func NewUnameMap(username string, id *upsilon.Upsilon) (*UnameMap, error)

NewUnameMap creates a new Username map to user ID

Jump to

Keyboard shortcuts

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