github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/state/state.go (about) 1 package state 2 3 import ( 4 "reflect" 5 6 "github.com/khulnasoft-lab/defsec/pkg/providers/aws" 7 "github.com/khulnasoft-lab/defsec/pkg/providers/azure" 8 "github.com/khulnasoft-lab/defsec/pkg/providers/cloudstack" 9 "github.com/khulnasoft-lab/defsec/pkg/providers/digitalocean" 10 "github.com/khulnasoft-lab/defsec/pkg/providers/github" 11 "github.com/khulnasoft-lab/defsec/pkg/providers/google" 12 "github.com/khulnasoft-lab/defsec/pkg/providers/kubernetes" 13 "github.com/khulnasoft-lab/defsec/pkg/providers/nifcloud" 14 "github.com/khulnasoft-lab/defsec/pkg/providers/openstack" 15 "github.com/khulnasoft-lab/defsec/pkg/providers/oracle" 16 "github.com/khulnasoft-lab/defsec/pkg/rego/convert" 17 ) 18 19 type State struct { 20 AWS aws.AWS 21 Azure azure.Azure 22 CloudStack cloudstack.CloudStack 23 DigitalOcean digitalocean.DigitalOcean 24 GitHub github.GitHub 25 Google google.Google 26 Kubernetes kubernetes.Kubernetes 27 OpenStack openstack.OpenStack 28 Oracle oracle.Oracle 29 Nifcloud nifcloud.Nifcloud 30 } 31 32 func (a *State) ToRego() interface{} { 33 return convert.StructToRego(reflect.ValueOf(a)) 34 }