storage

package
v1.20.1-0...-ed3b2c2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MPL-2.0 Imports: 42 Imported by: 0

Documentation

Overview

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0 Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0 Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0 SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Index

Constants

This section is empty.

Variables

View Source
var StorageBucketIamSchema = map[string]*schema.Schema{
	"bucket": {
		Type:             schema.TypeString,
		Required:         true,
		ForceNew:         true,
		DiffSuppressFunc: StorageBucketDiffSuppress,
	},
}
View Source
var StorageManagedFolderIamSchema = map[string]*schema.Schema{
	"bucket": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
	"managed_folder": {
		Type:             schema.TypeString,
		Required:         true,
		ForceNew:         true,
		DiffSuppressFunc: tpgresource.CompareSelfLinkOrResourceName,
		ValidateFunc:     verify.ValidateRegexp(`/$`),
	},
}

Functions

func DataSourceGoogleSignedUrl

func DataSourceGoogleSignedUrl() *schema.Resource

func DataSourceGoogleStorageBucket

func DataSourceGoogleStorageBucket() *schema.Resource

func DataSourceGoogleStorageBucketObject

func DataSourceGoogleStorageBucketObject() *schema.Resource

func DataSourceGoogleStorageBucketObjectContent

func DataSourceGoogleStorageBucketObjectContent() *schema.Resource

func DataSourceGoogleStorageBucketObjects

func DataSourceGoogleStorageBucketObjects() *schema.Resource

func DataSourceGoogleStorageBuckets

func DataSourceGoogleStorageBuckets() *schema.Resource

func DataSourceGoogleStorageProjectServiceAccount

func DataSourceGoogleStorageProjectServiceAccount() *schema.Resource

func ResourceStorageBucket

func ResourceStorageBucket() *schema.Resource

func ResourceStorageBucketAccessControl

func ResourceStorageBucketAccessControl() *schema.Resource

func ResourceStorageBucketAcl

func ResourceStorageBucketAcl() *schema.Resource

func ResourceStorageBucketObject

func ResourceStorageBucketObject() *schema.Resource

func ResourceStorageBucketStateUpgradeV0

func ResourceStorageBucketStateUpgradeV0(_ context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error)

func ResourceStorageBucketStateUpgradeV1

func ResourceStorageBucketStateUpgradeV1(_ context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error)

func ResourceStorageBucketStateUpgradeV2

func ResourceStorageBucketStateUpgradeV2(_ context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error)

func ResourceStorageDefaultObjectAccessControl

func ResourceStorageDefaultObjectAccessControl() *schema.Resource

func ResourceStorageDefaultObjectAcl

func ResourceStorageDefaultObjectAcl() *schema.Resource

func ResourceStorageHmacKey

func ResourceStorageHmacKey() *schema.Resource

func ResourceStorageManagedFolder

func ResourceStorageManagedFolder() *schema.Resource

func ResourceStorageNotification

func ResourceStorageNotification() *schema.Resource

func ResourceStorageNotificationParseID

func ResourceStorageNotificationParseID(id string) (string, string)

func ResourceStorageObjectAccessControl

func ResourceStorageObjectAccessControl() *schema.Resource

func ResourceStorageObjectAcl

func ResourceStorageObjectAcl() *schema.Resource

func SignString

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

SignString calculates the SHA256 signature of the input string

func StorageBucketDiffSuppress

func StorageBucketDiffSuppress(_, old, new string, _ *schema.ResourceData) bool

func StorageBucketIdParseFunc

func StorageBucketIdParseFunc(d *schema.ResourceData, config *transport_tpg.Config) error

func StorageManagedFolderIdParseFunc

func StorageManagedFolderIdParseFunc(d *schema.ResourceData, config *transport_tpg.Config) error

Types

type RoleEntity

type RoleEntity struct {
	Role   string
	Entity string
}

func GetRoleEntityPair

func GetRoleEntityPair(role_entity string) (*RoleEntity, error)

type StorageBucketIamUpdater

type StorageBucketIamUpdater struct {
	Config *transport_tpg.Config
	// contains filtered or unexported fields
}

func (*StorageBucketIamUpdater) DescribeResource

func (u *StorageBucketIamUpdater) DescribeResource() string

func (*StorageBucketIamUpdater) GetMutexKey

func (u *StorageBucketIamUpdater) GetMutexKey() string

func (*StorageBucketIamUpdater) GetResourceIamPolicy

func (u *StorageBucketIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*StorageBucketIamUpdater) GetResourceId

func (u *StorageBucketIamUpdater) GetResourceId() string

func (*StorageBucketIamUpdater) SetResourceIamPolicy

func (u *StorageBucketIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type StorageManagedFolderIamUpdater

type StorageManagedFolderIamUpdater struct {
	Config *transport_tpg.Config
	// contains filtered or unexported fields
}

func (*StorageManagedFolderIamUpdater) DescribeResource

func (u *StorageManagedFolderIamUpdater) DescribeResource() string

func (*StorageManagedFolderIamUpdater) GetMutexKey

func (u *StorageManagedFolderIamUpdater) GetMutexKey() string

func (*StorageManagedFolderIamUpdater) GetResourceIamPolicy

func (u *StorageManagedFolderIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*StorageManagedFolderIamUpdater) GetResourceId

func (u *StorageManagedFolderIamUpdater) GetResourceId() string

func (*StorageManagedFolderIamUpdater) SetResourceIamPolicy

func (u *StorageManagedFolderIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type UrlData

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

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

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

func (*UrlData) Signature

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

func (*UrlData) SignedUrl

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

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

func (*UrlData) SigningString

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 -------------------

Jump to

Keyboard shortcuts

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