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