Documentation ¶
Index ¶
- func AddAdminUserToTeam(ctx context.Context, apiClient client.APIClient, adminsTeamID, userID string, ...) (bool, error)
- func CreateAdminTeamIfMissing(ctx context.Context, apiClient client.APIClient, dryRun bool) (string, bool, error)
- func CreateAdminUserOrUpdatePassword(ctx context.Context, apiClient client.APIClient, newAdminPassword string, ...) (string, bool, error)
- func EnsureTeam(ctx context.Context, id, description string, apiClient client.APIClient, ...) (string, bool, error)
- func UpdateV1AdminsPolicyIfNeeded(ctx context.Context, apiClient client.APIClient, dryRun bool) (bool, bool, error)
- func UpdateV2AdminsPolicyIfNeeded(ctx context.Context, apiClient client.APIClient, dryRun bool) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAdminUserToTeam ¶
func AddAdminUserToTeam(ctx context.Context, apiClient client.APIClient, adminsTeamID, userID string, dryRun bool) (bool, error)
AddAdminUserToTeam adds the admin user to the admins team by its ID, unless the admin is already in the team. It returns a boolean representing whether or not the user needed to be added.
func CreateAdminTeamIfMissing ¶
func CreateAdminTeamIfMissing(ctx context.Context, apiClient client.APIClient, dryRun bool) (string, bool, error)
CreateAdminTeamIfMissing creates the admins team if it is missing. It returns the team ID in either case and a boolean for if it was found or created.
func CreateAdminUserOrUpdatePassword ¶
func CreateAdminUserOrUpdatePassword(ctx context.Context, apiClient client.APIClient, newAdminPassword string, dryRun bool) (string, bool, error)
CreateAdminUserOrUpdatePassword either creates a new admin user or updates the existing users password. In either case, it should return the ID and a boolean representing whether the user was found or created.
func EnsureTeam ¶
func EnsureTeam(ctx context.Context, id, description string, apiClient client.APIClient, dryRun bool) (string, bool, error)
EnsureTeam creates the desired team if it is missing, and returns the team's ID, together with a boolean indicating if the team was created by this call
func UpdateV1AdminsPolicyIfNeeded ¶
func UpdateV1AdminsPolicyIfNeeded(ctx context.Context, apiClient client.APIClient, dryRun bool) (bool, bool, error)
UpdateV1AdminsPolicyIfNeeded either creates a new admins policy if one doesn't exist anymore or creates a new admin policy with the admins team as a subject
if the admins team is not already a subject.
It returns two booleans: one representing if the original policy was found and the other representing if a new policy was created.
Types ¶
This section is empty.