Documentation ¶
Overview ¶
Package cai helps with Cloud Asset Inventory
Index ¶
- func BuildAncestorsDisplayName(ctx context.Context, ancestors []string, collectionID string, ...) []string
- func BuildAncestryPath(ancestors []string) string
- func GetAssetLabelValue(labelKey string, resourceJSON json.RawMessage) (string, error)
- func GetAssetShortTypeName(assetType string) string
- type FeedDeployment
- type FeedMessageGroup
- type FeedMessageGroupSettings
- type FeedMessageMember
- type Parameters
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAncestorsDisplayName ¶ added in v0.1.0
func BuildAncestorsDisplayName(ctx context.Context, ancestors []string, collectionID string, firestoreClient *firestore.Client, cloudresourcemanagerService *cloudresourcemanager.Service, cloudresourcemanagerServiceV2 *cloudresourcemanagerv2.Service) []string
BuildAncestorsDisplayName build a slice of Ancestor friendly name from a slice of ancestors
func BuildAncestryPath ¶ added in v0.1.0
BuildAncestryPath build a path from a slice of ancestors
func GetAssetLabelValue ¶ added in v0.1.2
func GetAssetLabelValue(labelKey string, resourceJSON json.RawMessage) (string, error)
GetAssetLabelValue retrieve a label value from a label key, e.g. owner of resolver contact from asset labels
func GetAssetShortTypeName ¶
GetAssetShortTypeName returns a short version of asset type <serviceName>-<assetType>, like bigquery-Dataset. It deals with k8s exceptions
Types ¶
type FeedDeployment ¶
type FeedDeployment struct { Artifacts struct { TopicName string `yaml:"topicName"` FeedName string `yaml:"feedName"` ContentType assetpb.ContentType FeedFullName string `yaml:"FeedFullName"` } Core *deploy.Core Settings struct { Instance struct { CAI Parameters } } }
FeedDeployment settings and artifacts structure
func NewFeedDeployment ¶
func NewFeedDeployment() *FeedDeployment
NewFeedDeployment create deployment structure
func (*FeedDeployment) Deploy ¶
func (feedDeployment *FeedDeployment) Deploy() (err error)
Deploy get-create resource feeds, get-create-update the iam policies feed
type FeedMessageGroup ¶ added in v0.1.0
type FeedMessageGroup struct { Asset assetGroup `json:"asset"` Window Window `json:"window"` Deleted bool `json:"deleted"` Origin string `json:"origin"` StepStack logging.Steps `json:"step_stack,omitempty"` }
FeedMessageGroup CAI like format
type FeedMessageGroupSettings ¶ added in v0.1.0
type FeedMessageGroupSettings struct { Asset assetGroupSettings `json:"asset"` Window Window `json:"window"` Deleted bool `json:"deleted"` Origin string `json:"origin"` }
FeedMessageGroupSettings CAI like format
type FeedMessageMember ¶ added in v0.1.0
type FeedMessageMember struct { Asset assetMember `json:"asset"` Window Window `json:"window"` Deleted bool `json:"deleted"` Origin string `json:"origin"` }
FeedMessageMember CAI like format