gcp

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2020 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const GiBToBytes = 1024 * 1024 * 1024

GiBTobytes converting GB to bytes

View Source
const TiBToGiB = 1024

TiBToGiB converting TiB to GiB

Variables

This section is empty.

Functions

func Provider

func Provider() terraform.ResourceProvider

Provider is the main method for NetApp GCP Terraform provider

func TranslateServiceLevelState2API

func TranslateServiceLevelState2API(slevel string) string

There is a bug on service level API. Translate based on the setup value. resource value: API call value standard : low premium : medium extreme : extreme

Types

type Client

type Client struct {
	Host                  string
	MaxConcurrentRequests int
	BaseURL               string
	ServiceAccount        string
	Project               string
	Audience              string
	// contains filtered or unexported fields
}

A Client to interact with the GCP REST API

func (*Client) CallAPIMethod

func (c *Client) CallAPIMethod(method string, baseURL string, params map[string]interface{}) (int, []byte, error)

CallAPIMethod can be used to make a request to any GCP API method, receiving results as byte

func (*Client) GetProjectID

func (c *Client) GetProjectID() string

GetProjectID returns the API version that will be used for GCP API requests

func (*Client) GetServiceAccount

func (c *Client) GetServiceAccount() string

GetServiceAccount returns the API version that will be used for GCP API requests

func (*Client) SetProjectID

func (c *Client) SetProjectID(project string)

SetProjectID for the client to use for requests to the GCP API

func (*Client) SetServiceAccount

func (c *Client) SetServiceAccount(serviceAccount string)

SetServiceAccount for the client to use for requests to the GCP API

Directories

Path Synopsis
cvs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL