Beispiel #1
0
// WhoAmI returns the login of the currently signed user
func (a *API) WhoAmI(args *rpc.Args, r *rpc.Ret) (err os.Error) {
	user, _, err := a.whoAmI(args)
	if err != nil {
		return err
	}
	login := ""
	if user != nil {
		login = user.Login
	}
	r.SetString("Login", login)

	return nil
}
Beispiel #2
0
func (a *API) HelloWorld(args *rpc.Args, r *rpc.Ret) os.Error {
	r.SetString("hello", "world")
	return nil
}