libopenstorage / secrets

Openstorage support for Key Management Systems
Apache License 2.0
16 stars 16 forks source link

Add Go mod and start versioning? #47

Closed leseb closed 4 years ago

leseb commented 4 years ago

Hi,

It'd be nice to have a go.mod to properly pull this library. Today I'm trying to use it to integrate with Vault but facing numerous challenges.

Because there is no go.mod my project mod imports the latest github.com/hashicorp/vault and the latest code is not compatible with it.

See:

# github.com/libopenstorage/secrets/vault
../../../../pkg/mod/github.com/libopenstorage/secrets@v0.0.0-20200920191743-99cf8bb2f07a/vault/vault.go:486:2: too many arguments to return
        have (string, http.Header, map[string]interface {}, error)
        want (string, map[string]interface {}, error)

Which github.com/hashicorp/vault should I pin to be able to properly use this library? Probably anything < Vault 1.4.X but if someone can hand over a god.mod using the latest version of this library that would be nice.

@adityadani or @saheienko maybe?

Alternatively, we could change the latest code to support Vault 1.4.X as well.

Also, it would be nice to start versioning instead of relying on commit sha1.

Thanks!

adityadani commented 4 years ago

Along with Vault we will need to add dependency version for other supported secret providers. @saheienko Can you take that up ?

saheienko commented 4 years ago

Hi @leseb

Current version supports Vault v1.2.3. While the go.mod file is not ready you can pin this version to your dependencies.