adminmgmt

package
v0.0.0-...-9f43f84 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAdminUserToTeam

func AddAdminUserToTeam(ctx context.Context,
	apiClient client.APIClient, adminTeamID, adminMembershipID string, dryRun bool) (bool, error)

func AddUserToTeam

func AddUserToTeam(ctx context.Context,
	apiClient client.APIClient, teamID, membershipID string, dryRun bool) (bool, error)

AddUserToTeam adds the user to a team by its ID, unless they are 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) (bool, error)

CreateAdminTeamIfMissing creates the admins team if it is missing. It returns 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 CreateUserOrUpdatePassword

func CreateUserOrUpdatePassword(ctx context.Context,
	apiClient client.APIClient, username, displayName, newPassword string, dryRun bool) (string, bool, error)

CreateUserOrUpdatePassword either creates a new user with the supplied username or updates the existing user's password. In either case, it returns the ID and a boolean representing whether the user was found or created.

func EnsureTeam

func EnsureTeam(ctx context.Context,
	id, name string,
	apiClient client.APIClient,
	dryRun bool) (bool, error)

EnsureTeam creates the desired team if it is missing, together with a boolean indicating if the team was created by this call

func UpdateAdminsPolicyIfNeeded

func UpdateAdminsPolicyIfNeeded(ctx context.Context,
	apiClient client.APIClient, dryRun bool) (bool, error)

UpdateAdminsPolicyIfNeeded fetches the chef-managed Admin policy's members and adds the admins team if it's missing from that list

Types

This section is empty.

Jump to

Keyboard shortcuts

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