Skip to content
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

Merged
merged 32 commits into from
Oct 7, 2024
Merged

Go serverside SDK docs #746

merged 32 commits into from
Oct 7, 2024

Conversation

sachaarbonel
Copy link
Member

No description provided.

@sachaarbonel sachaarbonel marked this pull request as ready for review September 20, 2024 12:41
<TabItem value="go" label="Golang">

```go
client.UpdateUsers(ctx, &UpdateUsersRequest{
Copy link
Member

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{}{
Copy link
Member

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{}{
Copy link
Member

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{}{
Copy link
Member

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)
Copy link
Member

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{
Copy link
Member

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(),
Copy link
Member

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?

@tbarbugli tbarbugli merged commit 57563dd into main Oct 7, 2024
3 checks passed
@tbarbugli tbarbugli deleted the go-sdk-docs branch October 7, 2024 13:07
@github-actions github-actions bot mentioned this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants