-
Notifications
You must be signed in to change notification settings - Fork 2
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
Some sample bootstrapping code would be helpful #34
Comments
Hey, @pantelis-karamolegkos! 👋 Thank you for bringing this up! I do agree that some additional examples could benefit the project and expand its influence to other developers that might be interested in using it—I will introduce this topic to the relevant stakeholders. For now, I can recommend taking a look at the following resources which are already available:
No, this isn't needed. You can simply call the relevant method directly via the const userAgent = "just-me"
aivenClient, err := aiven.NewClient(aiven.DebugOpt(true), aiven.UserAgentOpt(userAgent))
if err != nil {
log.Fatal(err)
}
aivenProjectGetOut, err := aivenClient.ProjectGet(ctx, "some-project-name")
if err != nil {
log.Fatal(err)
}
log.Println(fmt.Sprintf("Organization ID: %s", aivenProjectGetOut.OrganizationId)) I hope my answer provides you with the information that you were looking for 🙂. I will not be closing the issue and will update you once I have more information to share in regards to adding some examples to the project. |
Thanks @Serpentiel 💪🏻 |
Hey again, @pantelis-karamolegkos! 👋 That's great to hear. I've just received some information from the relevant stakeholders in regards to expanding the Go client further as a product. We will be working on more public documentation in the near future, including examples. Thank you once again for your input, I will close the issue once we have some examples in place 🙌. |
It looks like the README now has the correct instructions :) |
This issue was mostly dedicated to adding examples and usage docs for the Go client. The amount of docs in the README.md still isn't sufficient, IMO. But it's up to you to decide it now 🙂 |
What can we help you with?
I just want to bootstrap my client and make a request to list project details.
I have exported the
AIVEN_TOKEN
as environment variable so the following code works as expectedNow I want to list projects' details.
From what I understand, I must create a new (
project
)Handler
via this function.I was not able to find a way to create and/or initialize a
doer
(given that in the*client
returned the field is unexported).Where would you expect to find this information?
Either in
README.md
or within anexamples
folder.The text was updated successfully, but these errors were encountered: