Documentation ¶
Overview ¶
Package users represents the user resource
Index ¶
Constants ¶
View Source
const ( RoleAdmin = 100 RoleCustomer = 1 )
Roles for users
Variables ¶
This section is empty.
Functions ¶
func AllowedParams ¶
func AllowedParams() []string
AllowedParams returns an array of allowed param keys
func AllowedParamsCustomer ¶
func AllowedParamsCustomer() []string
AllowedParamsCustomer returns an array of params that customers can edit on their user
func Create ¶
Create inserts a new record in the database using params, and returns the newly created id
Types ¶
type User ¶
type User struct { model.Model status.ModelStatus Email string Key string Name string Password string Role int64 Summary string }
User handles saving and retreiving users from the database
func NewWithColumns ¶
NewWithColumns creates a new user instance and fills it with data from the database cols provided
Click to show internal directories.
Click to hide internal directories.