garage-k2v-go/auth.go

19 lines
322 B
Go
Raw Normal View History

2025-02-25 20:24:09 -05:00
package k2v
import "os"
const EnvVarKeyID = "K2V_KEY_ID"
const EnvVarKeySecret = "K2V_KEY_SECRET"
2025-03-09 20:51:43 -04:00
const EnvVarEndpoint = "K2V_ENDPOINT"
2025-02-25 20:24:09 -05:00
func KeyFromEnv() Key {
return Key{
ID: os.Getenv(EnvVarKeyID),
Secret: os.Getenv(EnvVarKeySecret),
}
}
2025-03-09 20:51:43 -04:00
func EndpointFromEnv() string {
return os.Getenv(EnvVarEndpoint)
}