Documentation ¶
Index ¶
- func Create(t repo.Tx) error
- func Insert(t repo.Tx, u *Model) error
- type Model
- func New(username, password, email, firstName, lastName string, authLevel uint8) (*Model, error)
- func NewAdmin(username, password, email, firstName, lastName string) (*Model, error)
- func NewModel() *Model
- func NewSuperUser(username, password string) (*Model, error)
- func NewUser(username, password, email, firstName, lastName string) (*Model, error)
- func Select(t repo.Tx, userid string) (*Model, error)
- func SelectByUsername(t repo.Tx, username string) (*Model, error)
- type ModelPrivate
- type ModelPublic
- type UnameMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model defines a user
func NewSuperUser ¶
NewSuperUser creates a new superuser
func SelectByUsername ¶
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
Click to show internal directories.
Click to hide internal directories.