Documentation ¶
Index ¶
- Constants
- Variables
- func AuthenticateUser(user *schema.User, password string) error
- func ClaimSignup(id int, token, name, password string, verified bool) (*schema.User, error)
- func CreateActiveInvite(teamName, senderEmail, customerId, email string, perms *schema.UserFlags) (*schema.Invite, error)
- func CreateActiveUser(email, name, password, referrer string) (*schema.User, error)
- func DeleteSignup(id int) error
- func DeleteTeam(id string) error
- func DeleteUser(id int) error
- func EmailTokenUser(user *schema.User, duration time.Duration, referer string) error
- func GetTeam(id string) (*schema.Team, error)
- func GetTeamUsers(id string) ([]*schema.User, error)
- func GetUser(id int) (*schema.User, error)
- func GetUserCustID(id string) (*schema.User, error)
- func GetUserData(id int) ([]byte, error)
- func GetUserEmail(email string) (*schema.User, error)
- func HMACIntercomUser(user *schema.User) (string, error)
- func Init(config Config) error
- func InviteTokenUser(user *schema.User, duration time.Duration) error
- func MergeTeam(team *schema.Team, name, subscription string) error
- func MergeUser(user *schema.User, email, name, password string) error
- func NewUser(name, email, password string) (*schema.User, error)
- func SendTemplatedEmail(userId int, template string, vars map[string]interface{}) (*schema.User, error)
- func SendVerification(user *schema.User)
- func TokenUser(user *schema.User, duration time.Duration) (string, error)
- func UpdateTeam(team *schema.Team, name string, subscription string) (*schema.Team, error)
- func UpdateUser(user *schema.User, email, name, password string, duration time.Duration) (string, error)
- func UpdateUserData(id int, data []byte) ([]byte, error)
- func UpdateUserPerms(user *schema.User, perms *schema.UserFlags, duration time.Duration) (string, error)
- func VerificationToken(id string) string
- func VerifyToken(id, token string) bool
- func VerifyUser(user *schema.User, token string) (bool, error)
- type Config
- type MandrillMailer
- type PaginatedUsers
- type Signup
Constants ¶
View Source
const AllUserPerms = uint64(0x7)
0111b -- TODO(dan) AllPerms(permset) (uint64, error) in basic
Variables ¶
View Source
var ( UserNotFound = errors.New("user not found") CustomerNotFound = errors.New("customer not found") TeamNotFound = errors.New("team not found") SignupNotFound = errors.New("customer not found") SignupExists = errors.New("signup exists with that email") SignupAlreadyClaimed = errors.New("signup already claimed") SignupInvalidToken = errors.New("invalid token for signup") )
Functions ¶
func ClaimSignup ¶
func CreateActiveInvite ¶
func CreateActiveUser ¶
func DeleteSignup ¶
func DeleteUser ¶
func EmailTokenUser ¶
func GetTeamUsers ¶
Gets subset of fields of a customer accessible to team admin
func GetUserData ¶
func SendTemplatedEmail ¶
func SendVerification ¶
func UpdateTeam ¶
Updates subset of fields of a customer accessible to team admin (name, subscription)
func UpdateUser ¶
func UpdateUserPerms ¶
func VerificationToken ¶
func VerifyToken ¶
Types ¶
type MandrillMailer ¶
type PaginatedUsers ¶
type Signup ¶
type Signup struct { Id int `json:"id"` Email string `json:"email"` Name string `json:"name"` Claimed bool `json:"claimed"` Activated bool `json:"activated"` Referrer string `json:"referrer"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` CustomerId string `json:"-" db:"customer_id"` Perms *schema.UserFlags `json:"-" db:"perms"` }
func ActivateSignup ¶
func CreateActiveSignup ¶
func GetSignupsByCustomerId ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.