MCPcopy Create free account
hub / github.com/cloudfoundry/cli / DeleteUser

Method DeleteUser

api/uaa/user.go:96–120  ·  view source on GitHub ↗
(userGuid string)

Source from the content-addressed store, hash-verified

94}
95
96func (client *Client) DeleteUser(userGuid string) (User, error) {
97 deleteRequest, err := client.newRequest(requestOptions{
98 RequestName: internal.DeleteUserRequest,
99 Header: http.Header{
100 "Content-Type": {"application/json"},
101 },
102 URIParams: map[string]string{"user_guid": userGuid},
103 })
104
105 if err != nil {
106 return User{}, err
107 }
108
109 var deleteUserResponse newUserResponse
110 deleteResponse := Response{
111 Result: &deleteUserResponse,
112 }
113
114 err = client.connection.Make(deleteRequest, &deleteResponse)
115 if err != nil {
116 return User{}, err
117 }
118
119 return User(deleteUserResponse), nil
120}
121
122// ListUsers gets a list of users from UAA with the given username and (if provided) origin.
123// NOTE: that this is a paginated response and we are only currently returning the first page

Callers

nothing calls this directly

Calls 3

newRequestMethod · 0.95
UserStruct · 0.70
MakeMethod · 0.65

Tested by

no test coverage detected