google

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2017 License: MPL-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const FINGERPRINT_FAIL = "Invalid fingerprint."
View Source
const FINGERPRINT_RETRIES = 10

Variables

This section is empty.

Functions

func MetadataFormatSchema added in v0.6.4

func MetadataFormatSchema(curMDMap map[string]interface{}, md *compute.Metadata) map[string]interface{}

Format metadata from the server data format -> schema data format

func MetadataRetryWrapper added in v0.6.4

func MetadataRetryWrapper(update func() error) error

Since the google compute API uses optimistic locking, there is a chance we need to resubmit our updated metadata. To do this, you need to provide an update function that attempts to submit your metadata

func MetadataUpdate added in v0.6.4

func MetadataUpdate(oldMDMap map[string]interface{}, newMDMap map[string]interface{}, serverMD *compute.Metadata)

Update the metadata (serverMD) according to the provided diff (oldMDMap v newMDMap).

func Provider

func Provider() terraform.ResourceProvider

Provider returns a terraform.ResourceProvider.

func SignString added in v0.9.6

func SignString(toSign []byte, cfg *jwt.Config) ([]byte, error)

SignString calculates the SHA256 signature of the input string

Types

type ComputeOperationError added in v0.6.4

type ComputeOperationError compute.OperationError

ComputeOperationError wraps compute.OperationError and implements the error interface so it can be returned.

func (ComputeOperationError) Error added in v0.6.4

func (e ComputeOperationError) Error() string

type ComputeOperationWaitType added in v0.6.4

type ComputeOperationWaitType byte

OperationWaitType is an enum specifying what type of operation we're waiting on.

const (
	ComputeOperationWaitInvalid ComputeOperationWaitType = iota
	ComputeOperationWaitGlobal
	ComputeOperationWaitRegion
	ComputeOperationWaitZone
)

type ComputeOperationWaiter added in v0.6.4

type ComputeOperationWaiter struct {
	Service *compute.Service
	Op      *compute.Operation
	Project string
	Region  string
	Type    ComputeOperationWaitType
	Zone    string
}

func (*ComputeOperationWaiter) Conf added in v0.6.4

func (*ComputeOperationWaiter) RefreshFunc added in v0.6.4

type Config

type Config struct {
	Credentials string
	Project     string
	Region      string
	// contains filtered or unexported fields
}

Config is the configuration structure used to instantiate the Google provider.

type ContainerOperationWaiter added in v0.9.0

type ContainerOperationWaiter struct {
	Service *container.Service
	Op      *container.Operation
	Project string
	Zone    string
}

func (*ContainerOperationWaiter) Conf added in v0.9.0

func (*ContainerOperationWaiter) RefreshFunc added in v0.9.0

type DnsChangeWaiter added in v0.5.0

type DnsChangeWaiter struct {
	Service     *dns.Service
	Change      *dns.Change
	Project     string
	ManagedZone string
}

func (*DnsChangeWaiter) Conf added in v0.5.0

func (*DnsChangeWaiter) RefreshFunc added in v0.5.0

func (w *DnsChangeWaiter) RefreshFunc() resource.StateRefreshFunc

type ResourceManagerOperationWaiter added in v0.8.5

type ResourceManagerOperationWaiter struct {
	Service *cloudresourcemanager.Service
	Op      *cloudresourcemanager.Operation
}

func (*ResourceManagerOperationWaiter) Conf added in v0.8.5

func (*ResourceManagerOperationWaiter) RefreshFunc added in v0.8.5

type RoleEntity added in v0.6.4

type RoleEntity struct {
	Role   string
	Entity string
}

type ServiceManagementOperationWaiter added in v0.8.5

type ServiceManagementOperationWaiter struct {
	Service *servicemanagement.APIService
	Op      *servicemanagement.Operation
}

func (*ServiceManagementOperationWaiter) Conf added in v0.8.5

func (*ServiceManagementOperationWaiter) RefreshFunc added in v0.8.5

type SqlAdminOperationError added in v0.6.7

type SqlAdminOperationError sqladmin.OperationErrors

SqlAdminOperationError wraps sqladmin.OperationError and implements the error interface so it can be returned.

func (SqlAdminOperationError) Error added in v0.6.7

func (e SqlAdminOperationError) Error() string

type SqlAdminOperationWaiter added in v0.6.7

type SqlAdminOperationWaiter struct {
	Service *sqladmin.Service
	Op      *sqladmin.Operation
	Project string
}

func (*SqlAdminOperationWaiter) Conf added in v0.6.7

func (*SqlAdminOperationWaiter) RefreshFunc added in v0.6.7

type UrlData added in v0.9.6

type UrlData struct {
	JwtConfig   *jwt.Config
	ContentMd5  string
	ContentType string
	HttpMethod  string
	Expires     int
	HttpHeaders map[string]string
	Path        string
}

UrlData stores the values required to create a Signed Url

func (*UrlData) EncodedSignature added in v0.9.6

func (u *UrlData) EncodedSignature() (string, error)

EncodedSignature returns the Signature() after base64 encoding and url escaping

func (*UrlData) Signature added in v0.9.6

func (u *UrlData) Signature() ([]byte, error)

func (*UrlData) SignedUrl added in v0.9.6

func (u *UrlData) SignedUrl() (string, error)

SignedUrl constructs the final signed URL a client can use to retrieve storage object

func (*UrlData) SigningString added in v0.9.6

func (u *UrlData) SigningString() []byte

SigningString creates a string representation of the UrlData in a form ready for signing: see https://cloud.google.com/storage/docs/access-control/create-signed-urls-program Example output: ------------------- GET

1388534400 bucket/objectname -------------------

Source Files

Jump to

Keyboard shortcuts

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