usersync

package
v0.0.0-...-386a0b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SlaveURL = "https://simulation.everycloud.com/"

SlaveURL URL to identify origin website

Variables

View Source
var APIPassword = os.Getenv("USERSYNC_API_PASSWORD")

APIPassword is a password used during authentication

View Source
var APIURL = "https://www.everycloud.com/api"

APIURL is a URL of the user sync API

View Source
var APIUser = os.Getenv("USERSYNC_API_USER")

APIUser is a username used during authentication

View Source
var Debug = false

Debug if set to true will route all API requests to a local endpoint

View Source
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

func DeleteUser(buid int64) error

DeleteUser tells the main server to delete a user with the given bakery user id

func GetUserDetails

func GetUserDetails(buid int64) (fullname, domain string, sendEmail bool, err error)

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

func ResetPassword(buid int64) error

ResetPassword instructs the main server to perform password reset procedure for the given bakery user id

func UpdateUser

func UpdateUser(buid int64, username, email, password string, role, partner int64) error

UpdateUser tells the main server to update username, email, password, role and partner id of a user with the given bakery user id (the main server itself must decide which props have changed)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL