-
Notifications
You must be signed in to change notification settings - Fork 50
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
Golang SDK #218
Golang SDK #218
Conversation
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.
I think we should look into moving the c interface behind an internal
package since it's not "safe" to consume. And only expose managed wrappers.
Do we need to define a proper package instead of main
? Can golang packages be distributed as a subdirectory of this repo or do we need to host the code in it's own repository.
👍
You don't necessarily need a separate repository for distributing your Go package. You can have it as a subdirectory in your existing repository. In your case, with the configuration as module github.com/bitwarden/sdk/languages/go, the package can reside as a subdirectory under this path. Consumers of your package would import it like this: |
Some small comments:
Otherwise the code worked correctly in my testing and I see you're already working on the CI release action, great! |
Can we get a condensed list of what is still blocking merge? The inclusion of this SDK is the only thing blocking bitwarden's inclusion in external secrets for k8s external-secrets/external-secrets#2661 |
Sorry for a delay, but all issues have been addressed. Additionally removed hard dependancy on clientsettings from schemas. |
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.
Minor nit and please run prettier on the readme. npm run prettier
in the project root.
Otherwise it looks good!
I did run it , but no changes |
The languages directories are excluded from prettier in
We'll need to fix the |
That did the trick |
1dc8a3b
hello I know the PR is already closed but I have a small question. i see a mention of |
@larivierec Our plan is for go users to download the c-lib manually since including it in the repository would be unmaintainable and quickly balloon the repository size. |
@cvele hey man, I'm having a bad time trying to compile the example project located at
any tips? |
@carnei-ro you need to run |
@Hinton now I have this error:
edit: If I run |
I was trying to do this too and built the whole thing and did the vpr thing, but I'm getting
I'm new to cgo, so I'm not sure what's up. Any ideas anyone? I know this is a closed PR, but I tried the rest of the places, and there are no answers, guides, docs, anything on how to deal with the SDK. |
ah.... finally, success
|
In fact, there was no need for the |
Type of change
Objective
The objective is to develop a Golang wrapper for the Bitwarden client that interacts with a native rust library. This is to ensure that a consistent interface is provided, and the details of the Bitwarden rust library can be abstracted away.
Code changes
BitwardenClient.go
BitwardenLibrary_native.go
BitwardenLibrary_custom.go
CommandRunner.go
Projects.go
Secrets.go
Notes