Add  Server API method: UserInfo

Add a method to the UserManagerAPI which takes a username and returns a struct of user information (username and display name at this stage).
Done. In an earlier commet on params you questioned the need for 
marshalling and said that we do not want to take an API result and 
serialize it straight out to the CLI. I'm happy to return the 
marshalling annotations again, but what will we use them for? Or was it 
just the YAML format you were questioning, as I see you are only 
marshalling to JSON?


On 11/06/14 19:36, fwereade wrote:
>
> In state/api/params/params.go:
>
> > @@ -741,3 +741,14 @@ type EnsureAvailability struct {
> >  	// If this is empty, then the environment's default series is used.
> >  	Series string
> >  }
> > +
> > +// UserInfoResult holds the result of a UserInfo call.
>
> Please separate the info from the result.
>
> |type UserInfo struct {
>      Username string `json:username`
>      DisplayName string `json:display-name`
> }
>
> type UserInfoResult struct {
>      Result *UserInfo `json:result,omitempty`
>      Error *Error `json:error,omitempty`
> }
> |
>
> But |UserInfoResults| is fine, apart from the lack of marshalling 
> annotations.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/juju/juju/pull/22/files#r13637047>.
>