google

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider added in v0.3.0

func NewProvider(ctx context.Context, maxResults uint64, project, region, credentials string) (provider.Provider, error)

NewProvider returns a Gooogle Provider

func ResourceTypeStrings

func ResourceTypeStrings() []string

ResourceTypeStrings returns a slice of all String values of the enum

Types

type GCPReader added in v0.3.0

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

GCPReader is the middleware between TC and GCP

func NewGcpReader added in v0.3.0

func NewGcpReader(ctx context.Context, maxResults uint64, project, region, credentials string) (*GCPReader, error)

NewGcpReader returns a GCPReader with a catalog of services ready to be used

func (*GCPReader) ListBackendBuckets added in v0.5.0

func (r *GCPReader) ListBackendBuckets(ctx context.Context, filter string) ([]compute.BackendBucket, error)

ListBackendBuckets returns a list of BackendBuckets within a project

func (*GCPReader) ListBackendServices added in v0.3.0

func (r *GCPReader) ListBackendServices(ctx context.Context, filter string) ([]compute.BackendService, error)

ListBackendServices returns a list of BackendServices within a project

func (*GCPReader) ListBuckets added in v0.3.0

func (r *GCPReader) ListBuckets(ctx context.Context) ([]storage.Bucket, error)

ListBuckets returns a list of Buckets within a project

func (*GCPReader) ListDisks added in v0.3.0

func (r *GCPReader) ListDisks(ctx context.Context, filter string) (map[string][]compute.Disk, error)

ListDisks returns a list of Disks within a project and a zone

func (*GCPReader) ListFirewalls added in v0.3.0

func (r *GCPReader) ListFirewalls(ctx context.Context, filter string) ([]compute.Firewall, error)

ListFirewalls returns a list of Firewalls within a project

func (*GCPReader) ListForwardingRules added in v0.3.0

func (r *GCPReader) ListForwardingRules(ctx context.Context, filter string) ([]compute.ForwardingRule, error)

ListForwardingRules returns a list of ForwardingRules within a project

func (*GCPReader) ListGlobalForwardingRules added in v0.3.0

func (r *GCPReader) ListGlobalForwardingRules(ctx context.Context, filter string) ([]compute.ForwardingRule, error)

ListGlobalForwardingRules returns a list of GlobalForwardingRules within a project

func (*GCPReader) ListHealthChecks added in v0.3.0

func (r *GCPReader) ListHealthChecks(ctx context.Context, filter string) ([]compute.HealthCheck, error)

ListHealthChecks returns a list of HealthChecks within a project

func (*GCPReader) ListInstanceGroups added in v0.3.0

func (r *GCPReader) ListInstanceGroups(ctx context.Context, filter string) (map[string][]compute.InstanceGroup, error)

ListInstanceGroups returns a list of InstanceGroups within a project and a zone

func (*GCPReader) ListInstances added in v0.3.0

func (r *GCPReader) ListInstances(ctx context.Context, filter string) (map[string][]compute.Instance, error)

ListInstances returns a list of Instances within a project and a zone

func (*GCPReader) ListManagedZones added in v0.4.0

func (r *GCPReader) ListManagedZones(ctx context.Context) ([]dns.ManagedZone, error)

ListManagedZones returns a list of ManagedZones within a project

func (*GCPReader) ListNetworks added in v0.3.0

func (r *GCPReader) ListNetworks(ctx context.Context, filter string) ([]compute.Network, error)

ListNetworks returns a list of Networks within a project

func (*GCPReader) ListProjectIAMCustomRoles added in v0.5.0

func (r *GCPReader) ListProjectIAMCustomRoles(ctx context.Context, parent string) ([]iam.Role, error)

ListProjectIAMCustomRoles returns a list of ProjectIamCustomRole within a parent

func (*GCPReader) ListResourceRecordSets added in v0.4.0

func (r *GCPReader) ListResourceRecordSets(ctx context.Context, managedZone []string) (map[string][]dns.ResourceRecordSet, error)

ListResourceRecordSets returns a list of ResourceRecordSets within a project and a zone

func (*GCPReader) ListSSLCertificates added in v0.3.0

func (r *GCPReader) ListSSLCertificates(ctx context.Context, filter string) ([]compute.SslCertificate, error)

ListSSLCertificates returns a list of SSLCertificates within a project

func (*GCPReader) ListStorageInstances added in v0.3.0

func (r *GCPReader) ListStorageInstances(ctx context.Context, filter string) ([]sqladmin.DatabaseInstance, error)

ListStorageInstances returns a list of StorageInstances within a project

func (*GCPReader) ListTargetHTTPProxies added in v0.3.0

func (r *GCPReader) ListTargetHTTPProxies(ctx context.Context, filter string) ([]compute.TargetHttpProxy, error)

ListTargetHTTPProxies returns a list of TargetHTTPProxies within a project

func (*GCPReader) ListTargetHTTPSProxies added in v0.3.0

func (r *GCPReader) ListTargetHTTPSProxies(ctx context.Context, filter string) ([]compute.TargetHttpsProxy, error)

ListTargetHTTPSProxies returns a list of TargetHTTPSProxies within a project

func (*GCPReader) ListURLMaps added in v0.3.0

func (r *GCPReader) ListURLMaps(ctx context.Context, filter string) ([]compute.UrlMap, error)

ListURLMaps returns a list of URLMaps within a project

type ResourceType

type ResourceType int

ResourceType is the type used to define all the Resources from the Provider

const (
	ComputeInstance ResourceType = iota
	ComputeFirewall
	ComputeNetwork
	// With Google, an HTTP(S) load balancer has 3 parts:
	// * backend configuration: instance_group, backend_service and health_check
	// * host and path rules: url_map
	// * frontend configuration: target_http(s)_proxy + global_forwarding_rule
	ComputeHealthCheck
	ComputeInstanceGroup
	ComputeInstanceIAMPolicy
	ComputeBackendBucket
	ComputeBackendService
	ComputeSSLCertificate
	ComputeTargetHTTPProxy
	ComputeTargetHTTPSProxy
	ComputeURLMap
	ComputeGlobalForwardingRule
	ComputeForwardingRule
	ComputeDisk
	DNSManagedZone
	DNSRecordSet
	ProjectIAMCustomRole
	StorageBucket
	StorageBucketIAMPolicy
	SQLDatabaseInstance
)

func ResourceTypeString

func ResourceTypeString(s string) (ResourceType, error)

ResourceTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ResourceTypeValues

func ResourceTypeValues() []ResourceType

ResourceTypeValues returns all values of the enum

func (ResourceType) IsAResourceType

func (i ResourceType) IsAResourceType() bool

IsAResourceType returns "true" if the value is listed in the enum definition. "false" otherwise

func (ResourceType) String

func (i ResourceType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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