Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteTrainingCampaigns(uid int64)
- func DeleteUser(buid int64) error
- func GetUserDetails(buid int64) (fullname, domain string, sendEmail bool, err error)
- func PushUser(id int64, username, email, fullName, password string, rid, pid int64, sso bool) (int64, error)
- func ResetPassword(buid int64) error
- func UpdateUser(buid int64, username, email, password string, role, partner int64) error
Constants ¶
const SlaveURL = "https://simulation.everycloud.com/"
SlaveURL URL to identify origin website
Variables ¶
var APIPassword = os.Getenv("USERSYNC_API_PASSWORD")
APIPassword is a password used during authentication
var APIURL = "https://www.everycloud.com/api"
APIURL is a URL of the user sync API
var APIUser = os.Getenv("USERSYNC_API_USER")
APIUser is a username used during authentication
var Debug = false
Debug if set to true will route all API requests to a local endpoint
var TrainingAPIURL = "https://awareness-stage.everycloud.com:4433/api"
TrainingAPIURL is a URL of the security awareness training API
Functions ¶
func DeleteTrainingCampaigns ¶
func DeleteTrainingCampaigns(uid int64)
DeleteTrainingCampaigns tells the main server to delete training campaigns of user with the given uid
func DeleteUser ¶
DeleteUser tells the main server to delete a user with the given bakery user id
func GetUserDetails ¶
GetUserDetails requests details of user with the given bakery id from the main server
func PushUser ¶
func PushUser(id int64, username, email, fullName, password string, rid, pid int64, sso bool) (int64, error)
PushUser sends user details to the main server and returns error if something is wrong and in case of success it returns a master user id assigned to the newly created user. sso flag - when set to true means this sync op should not create new user record but only update user id.
func ResetPassword ¶
ResetPassword instructs the main server to perform password reset procedure for the given bakery user id
Types ¶
This section is empty.