Documentation ¶
Index ¶
- func NewProvider(ctx context.Context, maxResults uint64, project, region, credentials string) (provider.Provider, error)
- func ResourceTypeStrings() []string
- type GCPReader
- func (r *GCPReader) ListAddresses(ctx context.Context, filter string) ([]compute.Address, error)
- func (r *GCPReader) ListAutoscalers(ctx context.Context, filter string) (map[string][]compute.Autoscaler, error)
- func (r *GCPReader) ListBackendBuckets(ctx context.Context, filter string) ([]compute.BackendBucket, error)
- func (r *GCPReader) ListBackendServices(ctx context.Context, filter string) ([]compute.BackendService, error)
- func (r *GCPReader) ListBillingSubaccounts(ctx context.Context) ([]cloudbilling.BillingAccount, error)
- func (r *GCPReader) ListCONTAINERClusters(ctx context.Context, filter string, parent string) ([]container.Cluster, error)
- func (r *GCPReader) ListDNSManagedZones(ctx context.Context) ([]dns.ManagedZone, error)
- func (r *GCPReader) ListDNSPolicies(ctx context.Context) ([]dns.Policy, error)
- func (r *GCPReader) ListDNSResourceRecordSets(ctx context.Context, managedZones []string) (map[string][]dns.ResourceRecordSet, error)
- func (r *GCPReader) ListDisks(ctx context.Context, filter string) (map[string][]compute.Disk, error)
- func (r *GCPReader) ListFilestoreInstances(ctx context.Context, filter string, parent string) ([]file.Instance, error)
- func (r *GCPReader) ListFirewalls(ctx context.Context, filter string) ([]compute.Firewall, error)
- func (r *GCPReader) ListForwardingRules(ctx context.Context, filter string) ([]compute.ForwardingRule, error)
- func (r *GCPReader) ListGlobalAddresses(ctx context.Context, filter string) ([]compute.Address, error)
- func (r *GCPReader) ListGlobalForwardingRules(ctx context.Context, filter string) ([]compute.ForwardingRule, error)
- func (r *GCPReader) ListHealthChecks(ctx context.Context, filter string) ([]compute.HealthCheck, error)
- func (r *GCPReader) ListImages(ctx context.Context, filter string) ([]compute.Image, error)
- func (r *GCPReader) ListInstanceGroupManagers(ctx context.Context, filter string) (map[string][]compute.InstanceGroupManager, error)
- func (r *GCPReader) ListInstanceGroups(ctx context.Context, filter string) (map[string][]compute.InstanceGroup, error)
- func (r *GCPReader) ListInstanceTemplates(ctx context.Context, filter string) ([]compute.InstanceTemplate, error)
- func (r *GCPReader) ListInstances(ctx context.Context, filter string) (map[string][]compute.Instance, error)
- func (r *GCPReader) ListLogMetrics(ctx context.Context, parent string) ([]logging.LogMetric, error)
- func (r *GCPReader) ListMONITORINGAlertPolicies(ctx context.Context, filter string, parent string) ([]monitoring.AlertPolicy, error)
- func (r *GCPReader) ListMONITORINGGroups(ctx context.Context, parent string) ([]monitoring.Group, error)
- func (r *GCPReader) ListMONITORINGNotificationChannels(ctx context.Context, parent string) ([]monitoring.NotificationChannel, error)
- func (r *GCPReader) ListMONITORINGUptimeCheckConfigs(ctx context.Context, parent string) ([]monitoring.UptimeCheckConfig, error)
- func (r *GCPReader) ListManagedSslCertificates(ctx context.Context, filter string) ([]compute.SslCertificate, error)
- func (r *GCPReader) ListNetworkEndpointGroups(ctx context.Context, filter string) (map[string][]compute.NetworkEndpointGroup, error)
- func (r *GCPReader) ListNetworks(ctx context.Context, filter string) ([]compute.Network, error)
- func (r *GCPReader) ListProjectIAMCustomRoles(ctx context.Context, parent string) ([]iam.Role, error)
- func (r *GCPReader) ListRedisInstances(ctx context.Context, parent string) ([]redis.Instance, error)
- func (r *GCPReader) ListRoutes(ctx context.Context, filter string) ([]compute.Route, error)
- func (r *GCPReader) ListSQLDatabaseInstances(ctx context.Context, filter string) ([]sqladmin.DatabaseInstance, error)
- func (r *GCPReader) ListSQLDatabases(ctx context.Context, filter string, instances []string) (map[string][]sqladmin.Database, error)
- func (r *GCPReader) ListSSLCertificates(ctx context.Context, filter string) ([]compute.SslCertificate, error)
- func (r *GCPReader) ListSTORAGEBuckets(ctx context.Context) ([]storage.Bucket, error)
- func (r *GCPReader) ListSecurityPolicies(ctx context.Context, filter string) ([]compute.SecurityPolicy, error)
- func (r *GCPReader) ListServiceAttachments(ctx context.Context, filter string) ([]compute.ServiceAttachment, error)
- func (r *GCPReader) ListSnapshots(ctx context.Context, filter string) ([]compute.Snapshot, error)
- func (r *GCPReader) ListSslPolicies(ctx context.Context, filter string) ([]compute.SslPolicy, error)
- func (r *GCPReader) ListSubnetworks(ctx context.Context, filter string) ([]compute.Subnetwork, error)
- func (r *GCPReader) ListTargetGrpcProxies(ctx context.Context, filter string) ([]compute.TargetGrpcProxy, error)
- func (r *GCPReader) ListTargetHTTPProxies(ctx context.Context, filter string) ([]compute.TargetHttpProxy, error)
- func (r *GCPReader) ListTargetHTTPSProxies(ctx context.Context, filter string) ([]compute.TargetHttpsProxy, error)
- func (r *GCPReader) ListTargetInstances(ctx context.Context, filter string) (map[string][]compute.TargetInstance, error)
- func (r *GCPReader) ListTargetPools(ctx context.Context, filter string) ([]compute.TargetPool, error)
- func (r *GCPReader) ListTargetSslProxies(ctx context.Context, filter string) ([]compute.TargetSslProxy, error)
- func (r *GCPReader) ListTargetTCPProxies(ctx context.Context, filter string) ([]compute.TargetTcpProxy, error)
- func (r *GCPReader) ListURLMaps(ctx context.Context, filter string) ([]compute.UrlMap, error)
- type ResourceType
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) ListAddresses ¶ added in v0.8.0
ListAddresses returns a list of Addresses within a project
func (*GCPReader) ListAutoscalers ¶ added in v0.8.0
func (r *GCPReader) ListAutoscalers(ctx context.Context, filter string) (map[string][]compute.Autoscaler, error)
ListAutoscalers returns a list of Autoscalers within a project and a zone
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) ListBillingSubaccounts ¶ added in v0.8.0
func (r *GCPReader) ListBillingSubaccounts(ctx context.Context) ([]cloudbilling.BillingAccount, error)
ListBillingSubaccounts returns a list of BillingAccounts
func (*GCPReader) ListCONTAINERClusters ¶ added in v0.8.0
func (r *GCPReader) ListCONTAINERClusters(ctx context.Context, filter string, parent string) ([]container.Cluster, error)
ListCONTAINERClusters returns a list of Clusters
func (*GCPReader) ListDNSManagedZones ¶ added in v0.8.0
ListDNSManagedZones returns a list of ManagedZones within a project
func (*GCPReader) ListDNSPolicies ¶ added in v0.8.0
ListDNSPolicies returns a list of Policies within a project
func (*GCPReader) ListDNSResourceRecordSets ¶ added in v0.8.0
func (r *GCPReader) ListDNSResourceRecordSets(ctx context.Context, managedZones []string) (map[string][]dns.ResourceRecordSet, error)
ListDNSResourceRecordSets returns a list of ResourceRecordSets within a project and a managedZones
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) ListFilestoreInstances ¶ added in v0.8.0
func (r *GCPReader) ListFilestoreInstances(ctx context.Context, filter string, parent string) ([]file.Instance, error)
ListFilestoreInstances returns a list of Instances within a project
func (*GCPReader) ListFirewalls ¶ added in v0.3.0
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) ListGlobalAddresses ¶ added in v0.8.0
func (r *GCPReader) ListGlobalAddresses(ctx context.Context, filter string) ([]compute.Address, error)
ListGlobalAddresses returns a list of GlobalAddress 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) ListImages ¶ added in v0.8.0
ListImages returns a list of Images within a project
func (*GCPReader) ListInstanceGroupManagers ¶ added in v0.8.0
func (r *GCPReader) ListInstanceGroupManagers(ctx context.Context, filter string) (map[string][]compute.InstanceGroupManager, error)
ListInstanceGroupManagers returns a list of InstanceGroupManagers within a project and a zone
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) ListInstanceTemplates ¶ added in v0.8.0
func (r *GCPReader) ListInstanceTemplates(ctx context.Context, filter string) ([]compute.InstanceTemplate, error)
ListInstanceTemplates returns a list of InstanceTemplates within a project
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) ListLogMetrics ¶ added in v0.8.0
ListLogMetrics returns a list of LogMetrics within a project
func (*GCPReader) ListMONITORINGAlertPolicies ¶ added in v0.8.0
func (r *GCPReader) ListMONITORINGAlertPolicies(ctx context.Context, filter string, parent string) ([]monitoring.AlertPolicy, error)
ListMONITORINGAlertPolicies returns a list of AlertPolicies within a project
func (*GCPReader) ListMONITORINGGroups ¶ added in v0.8.0
func (r *GCPReader) ListMONITORINGGroups(ctx context.Context, parent string) ([]monitoring.Group, error)
ListMONITORINGGroups returns a list of Groups within a project
func (*GCPReader) ListMONITORINGNotificationChannels ¶ added in v0.8.0
func (r *GCPReader) ListMONITORINGNotificationChannels(ctx context.Context, parent string) ([]monitoring.NotificationChannel, error)
ListMONITORINGNotificationChannels returns a list of NotificationChannels within a project
func (*GCPReader) ListMONITORINGUptimeCheckConfigs ¶ added in v0.8.0
func (r *GCPReader) ListMONITORINGUptimeCheckConfigs(ctx context.Context, parent string) ([]monitoring.UptimeCheckConfig, error)
ListMONITORINGUptimeCheckConfigs returns a list of UptimeCheckConfigs within a project
func (*GCPReader) ListManagedSslCertificates ¶ added in v0.8.0
func (r *GCPReader) ListManagedSslCertificates(ctx context.Context, filter string) ([]compute.SslCertificate, error)
ListManagedSslCertificates returns a list of SslCertificates within a project
func (*GCPReader) ListNetworkEndpointGroups ¶ added in v0.8.0
func (r *GCPReader) ListNetworkEndpointGroups(ctx context.Context, filter string) (map[string][]compute.NetworkEndpointGroup, error)
ListNetworkEndpointGroups returns a list of NetworkEndpointGroups within a project and a zone
func (*GCPReader) ListNetworks ¶ added in v0.3.0
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 Roles
func (*GCPReader) ListRedisInstances ¶ added in v0.8.0
func (r *GCPReader) ListRedisInstances(ctx context.Context, parent string) ([]redis.Instance, error)
ListRedisInstances returns a list of Instances within a project
func (*GCPReader) ListRoutes ¶ added in v0.8.0
ListRoutes returns a list of Routes within a project
func (*GCPReader) ListSQLDatabaseInstances ¶ added in v0.8.0
func (r *GCPReader) ListSQLDatabaseInstances(ctx context.Context, filter string) ([]sqladmin.DatabaseInstance, error)
ListSQLDatabaseInstances returns a list of StorageInstances within a project
func (*GCPReader) ListSQLDatabases ¶ added in v0.8.0
func (r *GCPReader) ListSQLDatabases(ctx context.Context, filter string, instances []string) (map[string][]sqladmin.Database, error)
ListSQLDatabases returns a list of Databases within a project and a instances
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) ListSTORAGEBuckets ¶ added in v0.8.0
ListSTORAGEBuckets returns a list of Buckets within a project
func (*GCPReader) ListSecurityPolicies ¶ added in v0.8.0
func (r *GCPReader) ListSecurityPolicies(ctx context.Context, filter string) ([]compute.SecurityPolicy, error)
ListSecurityPolicies returns a list of SecurityPolicies within a project
func (*GCPReader) ListServiceAttachments ¶ added in v0.8.0
func (r *GCPReader) ListServiceAttachments(ctx context.Context, filter string) ([]compute.ServiceAttachment, error)
ListServiceAttachments returns a list of ServiceAttachments within a project
func (*GCPReader) ListSnapshots ¶ added in v0.8.0
ListSnapshots returns a list of Snapshots within a project
func (*GCPReader) ListSslPolicies ¶ added in v0.8.0
func (r *GCPReader) ListSslPolicies(ctx context.Context, filter string) ([]compute.SslPolicy, error)
ListSslPolicies returns a list of SslPolicies within a project
func (*GCPReader) ListSubnetworks ¶ added in v0.8.0
func (r *GCPReader) ListSubnetworks(ctx context.Context, filter string) ([]compute.Subnetwork, error)
ListSubnetworks returns a list of Subnetworks within a project
func (*GCPReader) ListTargetGrpcProxies ¶ added in v0.8.0
func (r *GCPReader) ListTargetGrpcProxies(ctx context.Context, filter string) ([]compute.TargetGrpcProxy, error)
ListTargetGrpcProxies returns a list of TargetGrpcProxies 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) ListTargetInstances ¶ added in v0.8.0
func (r *GCPReader) ListTargetInstances(ctx context.Context, filter string) (map[string][]compute.TargetInstance, error)
ListTargetInstances returns a list of TargetInstances within a project and a zone
func (*GCPReader) ListTargetPools ¶ added in v0.8.0
func (r *GCPReader) ListTargetPools(ctx context.Context, filter string) ([]compute.TargetPool, error)
ListTargetPools returns a list of TargetPools within a project
func (*GCPReader) ListTargetSslProxies ¶ added in v0.8.0
func (r *GCPReader) ListTargetSslProxies(ctx context.Context, filter string) ([]compute.TargetSslProxy, error)
ListTargetSslProxies returns a list of TargetSslProxies within a project
type ResourceType ¶
type ResourceType int
ResourceType is the type used to define all the Resources from the Provider
const ( // compute engine ComputeInstance ResourceType = iota ComputeFirewall ComputeNetwork ComputeHealthCheck ComputeInstanceGroup ComputeInstanceIAMPolicy ComputeBackendBucket ComputeBackendService ComputeSSLCertificate ComputeTargetHTTPProxy ComputeTargetHTTPSProxy ComputeURLMap ComputeGlobalForwardingRule ComputeForwardingRule ComputeDisk ComputeAddress ComputeAttachedDisk ComputeAutoscaler ComputeGlobalAddress ComputeImage ComputeInstanceGroupManager ComputeInstanceTemplate ComputeManagedSSLCertificate ComputeNetworkEndpointGroup ComputeRoute ComputeSecurityPolicy ComputeServiceAttachment ComputeSnapshot ComputeSSLPolicy ComputeSubnetwork ComputeTargetGRPCProxy ComputeTargetInstance ComputeTargetPool ComputeTargetSSLProxy ComputeTargetTCPProxy // cloud dns DNSManagedZone DNSRecordSet DNSPolicy // cloud platform ProjectIAMCustomRole BillingSubaccount // cloud sql SQLDatabaseInstance SQLDatabase // cloud storage StorageBucket StorageBucketIAMPolicy // filestore FilestoreInstance // k8s container engine ContainerCluster ContainerNodePool // memorystore (redis) RedisInstance // cloud (Stackdriver) Logging LoggingMetric // cloud (Stackdriver) Monitoring MonitoringAlertPolicy MonitoringGroup MonitoringNotificationChannel MonitoringUptimeCheckConfig )
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