Documentation
¶
Overview ¶
Package userutil provides functions that help with management of users
Index ¶
- Constants
- func CreateDeviceOwner(ctx context.Context, username, password string, extraOpts ...chrome.Option) error
- func CreateUser(ctx context.Context, username, password string, extraOpts ...chrome.Option) error
- func GetKnownEmailsFromLocalState() (map[string]bool, error)
- func Login(ctx context.Context, username, password string) (*chrome.Chrome, error)
- func WaitForOwnership(ctx context.Context, cr *chrome.Chrome) error
Constants ¶
View Source
const TakingOwnershipTimeout = 20 * time.Second
TakingOwnershipTimeout is the maximum amount of time for taking ownership of the device after login.
Variables ¶
This section is empty.
Functions ¶
func CreateDeviceOwner ¶
func CreateDeviceOwner(ctx context.Context, username, password string, extraOpts ...chrome.Option) error
CreateDeviceOwner creates a user like the CreateUser function, but before closing the session it waits until the user becomes device owner.
func CreateUser ¶
CreateUser creates a new session with a given name and password, considering extra options. It immediately closes the session, so it should be used only for creating new users, not logging in.
func GetKnownEmailsFromLocalState ¶
GetKnownEmailsFromLocalState returns a map of users that logged in on the device, based on the LoggedInUsers from the LocalState file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.