Documentation
¶
Overview ¶
Copyright 2017 WALLIX
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func PluralizeResource(singular string) string
- func SingularizeResource(plural string) string
- type GraphAPI
- type LazyGraph
- func (g *LazyGraph) FilterGraph(q Query) (GraphAPI, error)
- func (g *LazyGraph) Find(q Query) ([]Resource, error)
- func (g *LazyGraph) FindOne(q Query) (Resource, error)
- func (g *LazyGraph) FindWithProperties(props map[string]any) ([]Resource, error)
- func (g *LazyGraph) MarshalTo(w io.Writer) error
- func (g *LazyGraph) Merge(aG GraphAPI) error
- func (g *LazyGraph) ResourceRelations(r Resource, relation string, recursive bool) ([]Resource, error)
- func (g *LazyGraph) ResourceSiblings(r Resource) ([]Resource, error)
- func (g *LazyGraph) VisitRelations(r Resource, relation string, includeResource bool, ...) error
- type Matcher
- type Query
- type Resource
- type Resources
- type Service
- type Services
Constants ¶
View Source
const ( Region string = "region" //infra Vpc string = "vpc" Subnet string = "subnet" Image string = "image" ImportImageTask string = "importimagetask" SecurityGroup string = "securitygroup" AvailabilityZone string = "availabilityzone" Keypair string = "keypair" Volume string = "volume" Instance string = "instance" InstanceProfile string = "instanceprofile" InternetGateway string = "internetgateway" NatGateway string = "natgateway" RouteTable string = "routetable" ElasticIP string = "elasticip" Snapshot string = "snapshot" NetworkInterface string = "networkinterface" Certificate string = "certificate" //loadbalancer ClassicLoadBalancer string = "classicloadbalancer" LoadBalancer string = "loadbalancer" TargetGroup string = "targetgroup" Listener string = "listener" //database Database string = "database" DBSubnetGroup string = "dbsubnetgroup" //access User string = "user" Role string = "role" Group string = "group" Policy string = "policy" AccessKey string = "accesskey" LoginProfile string = "loginprofile" MFADevice string = "mfadevice" //storage Bucket string = "bucket" S3Object string = "s3object" ACL string = "storageacl" //notification Subscription string = "subscription" Topic string = "topic" //queue Queue string = "queue" //dns Zone string = "zone" Record string = "record" //lambda Function string = "function" //autoscaling LaunchConfiguration string = "launchconfiguration" ScalingGroup string = "scalinggroup" ScalingPolicy string = "scalingpolicy" //monitoring Metric string = "metric" Alarm string = "alarm" //cdn Distribution string = "distribution" //cloudformation Stack string = "stack" //container Repository string = "repository" Registry string = "registry" ContainerCluster string = "containercluster" ContainerService string = "containerservice" ContainerTask string = "containertask" Container string = "container" ContainerInstance string = "containerinstance" //application autoscaling AppScalingTarget string = "appscalingtarget" AppScalingPolicy string = "appscalingpolicy" //eks EKSCluster string = "ekscluster" EKSNodeGroup string = "eksnodegroup" //dynamodb DynamoDBTable string = "dynamodbtable" //secrets & encryption Secret string = "secret" Key string = "key" //api gateway APIGateway string = "apigateway" APIGatewayRoute string = "apigatewayroute" APIGatewayStage string = "apigatewaystage" //ssm SSMParameter string = "ssmparameter" //efs FileSystem string = "filesystem" MountTarget string = "mounttarget" //cloudtrail Trail string = "trail" //cloudwatchlogs LogGroup string = "loggroup" //elasticache CacheCluster string = "cachecluster" ReplicationGroup string = "replicationgroup" CacheSubnetGroup string = "cachesubnetgroup" //eventbridge EventBus string = "eventbus" EventRule string = "eventrule" //stepfunctions StateMachine string = "statemachine" //wafv2 WebACL string = "webacl" IPSet string = "ipset" RuleGroup string = "rulegroup" //configservice ConfigRule string = "configrule" //kinesis Stream string = "stream" //redshift RedshiftCluster string = "redshiftcluster" RedshiftSubnetGroup string = "redshiftsubnetgroup" //codepipeline Pipeline string = "pipeline" //codebuild BuildProject string = "buildproject" //elasticbeanstalk Application string = "application" Environment string = "environment" //aws backup BackupPlan string = "backupplan" BackupVault string = "backupvault" //cloud map. "discoveryservice" because "containerservice" and the generic notion of //a service are both already in play. Namespace string = "namespace" DiscoveryService string = "discoveryservice" //global accelerator. "acceleratorlistener" because ELBv2 already owns "listener". Accelerator string = "accelerator" AcceleratorListener string = "acceleratorlistener" //fsx. "fsxfilesystem" because EFS already owns "filesystem". FSxFileSystem string = "fsxfilesystem" FSxBackup string = "fsxbackup" //amazon mq Broker string = "broker" //msk KafkaCluster string = "kafkacluster" //cognito. Two APIs: user pools on cognito-idp, identity pools on cognito-identity. UserPool string = "userpool" IdentityPool string = "identitypool" //sesv2 EmailIdentity string = "emailidentity" ConfigurationSet string = "configurationset" //glue. Qualified because "database" belongs to RDS and a bare "table" would not //say which catalog it is in. GlueDatabase string = "gluedatabase" GlueTable string = "gluetable" Crawler string = "crawler" Job string = "job" //codedeploy. "deployapplication" rather than "application", which Elastic //Beanstalk already owns. DeployApplication string = "deployapplication" DeploymentGroup string = "deploymentgroup" //vpc peering (on the EC2 API) VpcPeering string = "vpcpeering" //transit gateway and vpc endpoints (both on the EC2 API) TransitGateway string = "transitgateway" TransitGatewayAttachment string = "transitgatewayattachment" TransitGatewayRouteTable string = "transitgatewayroutetable" VpcEndpoint string = "vpcendpoint" )
Resources
Variables ¶
View Source
var ErrFetchAccessDenied = errors.New("access denied to cloud resource")
View Source
var ServiceRegistry = make(map[string]Service)
Functions ¶
func PluralizeResource ¶
func SingularizeResource ¶
Types ¶
type GraphAPI ¶
type GraphAPI interface {
Find(Query) ([]Resource, error)
FindWithProperties(map[string]any) ([]Resource, error)
FilterGraph(Query) (GraphAPI, error)
FindOne(Query) (Resource, error)
MarshalTo(w io.Writer) error
ResourceRelations(r Resource, relation string, recursive bool) ([]Resource, error)
VisitRelations(Resource, string, bool, func(Resource, int) error) error
ResourceSiblings(Resource) ([]Resource, error)
Merge(GraphAPI) error
}
type LazyGraph ¶
type LazyGraph struct {
LoadingFunc func() GraphAPI
// contains filtered or unexported fields
}
func (*LazyGraph) FindWithProperties ¶
func (*LazyGraph) ResourceRelations ¶
func (*LazyGraph) ResourceSiblings ¶
type Service ¶
type Service interface {
Region() string
Profile() string
Name() string
ResourceTypes() []string
IsSyncDisabled() bool
Fetch(context.Context) (GraphAPI, error)
FetchByType(context.Context, string) (GraphAPI, error)
}
func AllServices ¶
func AllServices() (out []Service)
func GetServiceForType ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
DO NOT EDIT This file was automatically generated with go generate
|
DO NOT EDIT This file was automatically generated with go generate |
|
DO NOT EDIT This file was automatically generated with go generate
|
DO NOT EDIT This file was automatically generated with go generate |
Click to show internal directories.
Click to hide internal directories.