MCPcopy Index your code
hub / github.com/cloudfoundry/cli / FindByUsername

Method FindByUsername

cf/api/users.go:71–83  ·  view source on GitHub ↗
(username string)

Source from the content-addressed store, hash-verified

69}
70
71func (repo CloudControllerUserRepository) FindByUsername(username string) (user models.UserFields, apiErr error) {
72 users, apiErr := repo.FindAllByUsername(username)
73 if apiErr != nil {
74 return user, apiErr
75 }
76 if len(users) > 1 {
77 return user, errors.New("The user exists in multiple origins.")
78 }
79
80 user = users[0]
81
82 return user, nil
83}
84
85func (repo CloudControllerUserRepository) FindAllByUsername(username string) (users []models.UserFields, apiErr error) {
86 uaaEndpoint, apiErr := repo.getAuthEndpoint()

Callers

nothing calls this directly

Calls 2

FindAllByUsernameMethod · 0.95
NewFunction · 0.92

Tested by

no test coverage detected