Documentation ¶
Index ¶
- func NewProvider(ctx context.Context, maxResults uint64, project, region, credentials string) (provider.Provider, error)
- func ResourceTypeStrings() []string
- type GCPReader
- 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) ListBuckets(ctx context.Context) ([]storage.Bucket, error)
- func (r *GCPReader) ListDisks(ctx context.Context, filter string) (map[string][]compute.Disk, 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) ListGlobalForwardingRules(ctx context.Context, filter string) ([]compute.ForwardingRule, error)
- func (r *GCPReader) ListHealthChecks(ctx context.Context, filter string) ([]compute.HealthCheck, error)
- func (r *GCPReader) ListInstanceGroups(ctx context.Context, filter string) (map[string][]compute.InstanceGroup, error)
- func (r *GCPReader) ListInstances(ctx context.Context, filter string) (map[string][]compute.Instance, error)
- func (r *GCPReader) ListManagedZones(ctx context.Context) ([]dns.ManagedZone, 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) ListResourceRecordSets(ctx context.Context, managedZone []string) (map[string][]dns.ResourceRecordSet, error)
- func (r *GCPReader) ListSSLCertificates(ctx context.Context, filter string) ([]compute.SslCertificate, error)
- func (r *GCPReader) ListStorageInstances(ctx context.Context, filter string) ([]sqladmin.DatabaseInstance, 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) 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) 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
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
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
ListManagedZones returns a list of ManagedZones within a project
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 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
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