Versions in this module Expand all Collapse all v0 v0.4.1 Feb 16, 2020 v0.4.0 Oct 10, 2018 Changes in this version + func NewHandler(a Auth, g Guard, l logging.Logger, webAppURL string, allowedOrigins []string) (http.Handler, error) + type Auth interface + CanRegisterFirst func() (bool, error) + GetUserDetails func(JWT, userID string) (*model.User, error) + Groups func(JWT, offset, count string) ([]model.Group, error) + Login func(loginType, identifier string, password []byte) (*model.User, error) + RegisterFirst func(loginType, userType, id string, secret []byte) (*model.User, error) + RegisterOther func(JWT, newLoginType, userType, id, groupID string) (*model.User, error) + RegisterSelf func(loginType, userType, id string, secret []byte) (*model.User, error) + RegisterSelfByLockedDevice func(loginType, userType, devID, number string, password []byte) (*model.User, error) + SendPassResetCode func(loginType, toAddr string) (*model.DBTStatus, error) + SendVerCode func(JWT, loginType, toAddr string) (*model.DBTStatus, error) + SetPassword func(loginType, onAddr string, dbt, pass []byte) (*model.VerifLogin, error) + SetUserGroup func(JWT, userID, groupID string) (*model.User, error) + UpdateIdentifier func(JWT, forUserID, loginType, newId string) (*model.User, error) + UpdatePassword func(JWT string, old, newPass []byte) error + UserID func(loginType, identifier string) (string, error) + Users func(JWT string, q model.UsersQuery, offset, count string) ([]model.User, error) + VerifyAndExtendDBT func(lt, forAddr string, dbt []byte) (string, error) + VerifyDBT func(loginType, forAddr string, dbt []byte) (*model.VerifLogin, error) + type DBTStatus struct + ExpiresAt string + ObfuscatedAddress string + func NewDBTStatus(dbtS *model.DBTStatus) *DBTStatus + type Device struct + CreateDate string + DeviceID string + ID string + UpdateDate string + UserID string + func NewDevice(g model.Device) *Device + func NewDevices(ds []model.Device) []Device + type Facebook struct + CreateDate string + FacebookID string + ID string + UpdateDate string + UserID string + Verified bool + func NewFacebook(fb model.Facebook) *Facebook + type Group struct + AccessLevel float32 + CreateDate string + ID string + Name string + UpdateDate string + func NewGroup(g model.Group) *Group + func NewGroups(gs []model.Group) []Group + type Guard interface + APIKeyValid func(key string) (string, error) + type User struct + CreateDate string + Devices []Device + Email *VerifLogin + Facebook *Facebook + Group *Group + ID string + JWT string + Phone *VerifLogin + Type *UserType + UpdateDate string + UserName *Username + func NewUser(user *model.User) *User + func NewUsers(usrs []model.User) []User + type UserType struct + CreateDate string + ID string + Name string + UpdateDate string + func NewUserType(ut model.UserType) *UserType + type Username struct + CreateDate string + ID string + UpdateDate string + UserID string + Value string + func NewUserName(un model.Username) *Username + type VerifLogin struct + Address string + CreateDate string + ID string + OTPStatus *DBTStatus + UpdateDate string + UserID string + Verified bool + func NewVerifLogin(vl *model.VerifLogin) *VerifLogin