-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go serverside SDK docs #746
Conversation
<TabItem value="go" label="Golang"> | ||
|
||
```go | ||
client.UpdateUsers(ctx, &UpdateUsersRequest{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this properly spaced / formatted?
Users: map[string]UserRequest{ | ||
"user_id": { | ||
Role: PtrTo("user"), | ||
Custom: &map[string]interface{}{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pointer to map is not necessary / weird (passing the map is ok)
Users: map[string]UserRequest{ | ||
"user_id": { | ||
Role: PtrTo("user"), | ||
Custom: &map[string]interface{}{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ptr to map
Users: []UpdateUserPartialRequest{ | ||
{ | ||
ID: "user_id", | ||
Set: &map[string]interface{}{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ptr to map
userID := "john" | ||
|
||
// exp and iat are optional, token will be valid for 1 hour | ||
exp := time.Now().Add(1 * time.Hour) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not consistent with Python (we pass 3600, not time.now + 1h)
Ring: PtrTo(true), | ||
Data: &CallRequest{ | ||
CreatedByID: PtrTo("myself"), | ||
Members: &[]MemberRequest{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ptr to slice
Grants: &map[string][]string{ | ||
"user": []string{}, | ||
"call_member": []string{ | ||
READ_CALL.String(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why dont we use constant strings?
No description provided.