SDK
SDK Golang v3.x
2

UpdateSelf #

Updates the current user object in Kuzzle.

Arguments #

func (a *Auth) UpdateSelf(data json.RawMessage, options types.QueryOptions) (*security.User, error)
ArgumentsTypeDescription
content
string
the new credentials
options
QueryOptions
QueryOptions object containing query options

Options #

Additional query options

PropertyTypeDescriptionDefault
Queuable
bool
Make this request queuable or nottrue

Return #

A pointer to a security.User object and an error or nil

Usage #

kuzzle.Auth.Login("local", json.RawMessage("{\"username\":\"foo\",\"password\":\"bar\"}"), nil)
_, err := kuzzle.Auth.UpdateSelf(json.RawMessage("{\"foo\":\"bar\"}"), nil)
if err != nil {
  log.Fatal(err)
} else {
  fmt.Println("Success")
}