usertest

package
v0.0.0-...-0bbbf19 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Current

func Current(t testing.TB) *user.User

Current returns the current user.

The first call will cache the current user information. Subsequent calls will return the cached value and will not reflect changes to the current user.

func Lookup

func Lookup(t testing.TB, username string) *user.User

Lookup looks up a user by username. If the user cannot be found, the returned error is of type [UnknownUserError].

func LookupGroup

func LookupGroup(t testing.TB, name string) *user.Group

LookupGroup looks up a group by name. If the group cannot be found, the returned error is of type [UnknownGroupError].

func LookupGroupId

func LookupGroupId(t testing.TB, gid string) *user.Group

LookupGroupId looks up a group by groupid. If the group cannot be found, the returned error is of type [UnknownGroupIdError].

func LookupId

func LookupId(t testing.TB, uid string) *user.User

LookupId looks up a user by userid. If the user cannot be found, the returned error is of type [UnknownUserIdError].

Types

This section is empty.

Jump to

Keyboard shortcuts

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