Documentation ¶
Index ¶
- Variables
- func CreateUser(w http.ResponseWriter, r *http.Request)
- func DeleteUser(w http.ResponseWriter, r *http.Request)
- func GetAllUsers(w http.ResponseWriter, r *http.Request)
- func GetGroupsAssignedToUser(w http.ResponseWriter, r *http.Request)
- func GetUserDetails(w http.ResponseWriter, r *http.Request)
- func GetUserDevicesByType(w http.ResponseWriter, r *http.Request)
- func InitStore(con *global.State)
- func InitStoreMock() *userstoremocks.UserStoreMock
- func RemoveUserDevice(w http.ResponseWriter, r *http.Request)
- func TrustUserDevice(w http.ResponseWriter, r *http.Request)
- func UpdateUser(w http.ResponseWriter, r *http.Request)
- type CreateUserReq
- type CreateUserResp
- type UserDetails
Constants ¶
This section is empty.
Variables ¶
View Source
var Store adapter
Store is the package state variable which contains database connections
Functions ¶
func CreateUser ¶
func CreateUser(w http.ResponseWriter, r *http.Request)
func DeleteUser ¶
func DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser should be atomic transaction - a single user delete call should delete users detail from every database tables. TODO make delete user atomic
func GetAllUsers ¶
func GetAllUsers(w http.ResponseWriter, r *http.Request)
GetAllUsers returns json array of user list.
func GetGroupsAssignedToUser ¶
func GetGroupsAssignedToUser(w http.ResponseWriter, r *http.Request)
func GetUserDetails ¶
func GetUserDetails(w http.ResponseWriter, r *http.Request)
func GetUserDevicesByType ¶
func GetUserDevicesByType(w http.ResponseWriter, r *http.Request)
GetUserDevicesByType returns all user devices under device types.
func InitStoreMock ¶
func InitStoreMock() *userstoremocks.UserStoreMock
InitStoreMock will init mock state of this package
func RemoveUserDevice ¶
func RemoveUserDevice(w http.ResponseWriter, r *http.Request)
RemoveUserDevice removes user device
func TrustUserDevice ¶
func TrustUserDevice(w http.ResponseWriter, r *http.Request)
TrustUserDevice marks certain user device as trusted
func UpdateUser ¶
func UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser updates TRASA user
Types ¶
type CreateUserReq ¶
type CreateUserReq struct { User models.UserWithPass `json:"user"` PasswordMethod string `json:"passMethod"` }
type CreateUserResp ¶
type UserDetails ¶
type UserDetails struct { User models.User `json:"user"` UserAccessMaps []models.AccessMapDetail `json:"userAccessMaps"` UserDevices []models.UserDevice `json:"userDevices"` UserGroups []models.Group `json:"userGroups"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.