forked from nutanix/terraform-provider-nutanix
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nutanix#243 from nutanix/v1.2.0-beta
V1.2.0 beta
- Loading branch information
Showing
654 changed files
with
122,296 additions
and
59,830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package karbon | ||
|
||
import ( | ||
"github.com/terraform-providers/terraform-provider-nutanix/client" | ||
) | ||
|
||
const ( | ||
absolutePath = "karbon" | ||
userAgent = "nutanix" | ||
) | ||
|
||
// Client manages the V3 API | ||
type Client struct { | ||
client *client.Client | ||
Cluster ClusterService | ||
PrivateRegistry PrivateRegistryService | ||
} | ||
|
||
// NewKarbonAPIClient return a client to operate Karbon resources | ||
func NewKarbonAPIClient(credentials client.Credentials) (*Client, error) { | ||
c, err := client.NewClient(&credentials, userAgent, absolutePath) | ||
|
||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
f := &Client{ | ||
client: c, | ||
Cluster: ClusterOperations{ | ||
client: c, | ||
}, | ||
PrivateRegistry: PrivateRegistryOperations{ | ||
client: c, | ||
}, | ||
} | ||
|
||
return f, nil | ||
} |
Oops, something went wrong.