garage-k2v-go/auth.go

18 lines
322 B
Go

package k2v
import "os"
const EnvVarKeyID = "K2V_KEY_ID"
const EnvVarKeySecret = "K2V_KEY_SECRET"
const EnvVarEndpoint = "K2V_ENDPOINT"
func KeyFromEnv() Key {
return Key{
ID: os.Getenv(EnvVarKeyID),
Secret: os.Getenv(EnvVarKeySecret),
}
}
func EndpointFromEnv() string {
return os.Getenv(EnvVarEndpoint)
}