cloud

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 31 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// FilestoreInstance is for specifying GCP Filestore Instance resource.
	FilestoreInstance resourceType = "FilestoreInstance"

	// FilestoreBackUp is for specifying GCP Filestore Backup resource.
	FilestoreBackUp resourceType = "FilestoreBackUp"
)
View Source
const (
	// ParameterKeyResourceTags is the name of the key defined in the parameters'
	// field of the StorageClass object, which holds the user defined resource tags.
	ParameterKeyResourceTags = "resource-tags"
)

Variables

This section is empty.

Functions

func NewAltTokenSource added in v0.4.0

func NewAltTokenSource(tokenURL, tokenBody string) oauth2.TokenSource

NewAltTokenSource constructs a new alternate token source for generating tokens.

func NewFakeAPIServer added in v1.6.18

func NewFakeAPIServer(retFailureFor interface{}) *httptest.Server

Types

type AltTokenSource added in v0.4.0

type AltTokenSource struct {
	// contains filtered or unexported fields
}

AltTokenSource is the structure holding the data for the functionality needed to generates tokens

func (*AltTokenSource) Token added in v0.4.0

func (a *AltTokenSource) Token() (*oauth2.Token, error)

Token returns a token which may be used for authentication

type Cloud

type Cloud struct {
	Config  *ConfigFile
	File    file.Service
	Project string
	Zone    string
}

func NewCloud

func NewCloud(ctx context.Context, version, configPath, primaryFilestoreServiceEndpoint, testFilestoreServiceEndpoint string) (*Cloud, error)

func NewFakeCloud

func NewFakeCloud() (*Cloud, error)

func NewFakeCloudWithFiler added in v1.2.0

func NewFakeCloudWithFiler(filer file.Service, project, location string) (*Cloud, error)

type ConfigFile added in v0.4.0

type ConfigFile struct {
	Global ConfigGlobal `gcfg:"global"`
}

type ConfigGlobal added in v0.4.0

type ConfigGlobal struct {
	TokenURL  string `gcfg:"token-url"`
	TokenBody string `gcfg:"token-body"`
	ProjectId string `gcfg:"project-id"`
	Zone      string `gcfg:"zone"`
}

type FakeTagServiceManager added in v1.6.18

type FakeTagServiceManager struct {
	mock.Mock
}

func NewFakeTagManager added in v1.6.18

func NewFakeTagManager() *FakeTagServiceManager

func NewFakeTagManagerForSanityTests added in v1.6.18

func NewFakeTagManagerForSanityTests() *FakeTagServiceManager

func (*FakeTagServiceManager) AttachResourceTags added in v1.6.18

func (f *FakeTagServiceManager) AttachResourceTags(ctx context.Context, rscType resourceType, rscName, rscLocation, reqName string, reqParameters map[string]string) error

func (*FakeTagServiceManager) SetResourceTags added in v1.6.18

func (f *FakeTagServiceManager) SetResourceTags(tag resourceTags)

func (*FakeTagServiceManager) ValidateResourceTags added in v1.6.18

func (f *FakeTagServiceManager) ValidateResourceTags(ctx context.Context, tagsSource, tags string) (resourceTags, error)

type TagService added in v1.6.18

type TagService interface {
	SetResourceTags(resourceTags)
	ValidateResourceTags(context.Context, string, string) (resourceTags, error)
	AttachResourceTags(context.Context, resourceType, string, string, string, map[string]string) error
}

TagService is the interface that wraps methods for resource tag operations.

func NewTagManager added in v1.6.18

func NewTagManager(cloud *Cloud, opts ...TagServiceOptions) TagService

NewTagManager creates a tagServiceManager instance.

type TagServiceOptions added in v1.6.18

type TagServiceOptions interface{}

TagServiceOptions is for specifying the optional TagService arguments.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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