mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-21 23:18:06 +00:00
Update constructor function name
This commit is contained in:
@@ -152,7 +152,7 @@ func main() {
|
||||
}
|
||||
|
||||
// Setup One Password Client
|
||||
opClient, err := opclient.NewClient(version.OperatorVersion)
|
||||
opClient, err := opclient.NewFromEnvironment(version.OperatorVersion)
|
||||
if err != nil {
|
||||
setupLog.Error(err, "unable to create 1Password client")
|
||||
os.Exit(1)
|
||||
|
@@ -18,8 +18,8 @@ type Client interface {
|
||||
GetVaultsByTitle(title string) ([]model.Vault, error)
|
||||
}
|
||||
|
||||
// NewClient creates a new 1Password client based on the provided configuration.
|
||||
func NewClient(integrationVersion string) (Client, error) {
|
||||
// NewFromEnvironment creates a new 1Password client based on the provided configuration.
|
||||
func NewFromEnvironment(integrationVersion string) (Client, error) {
|
||||
connectHost, _ := os.LookupEnv("OP_CONNECT_HOST")
|
||||
connectToken, _ := os.LookupEnv("OP_CONNECT_TOKEN")
|
||||
serviceAccountToken, _ := os.LookupEnv("OP_SERVICE_ACCOUNT_TOKEN")
|
||||
|
Reference in New Issue
Block a user