Documentation ¶
Overview ¶
Package upload2gcs stores feeds as JSON files in a Google Cloud Storage bucket. Create (with override), Delete - Triggered by: Messages in related PubSub topics - Instances:
- one for all IAM bindings policies
- one per AssetType for resource metadata
- Output: JSON files into a GCS bucket - Cardinality: one-one, one pubsub message - one file created (with override) or deleted - Automatic retrying: yes - Required environment variables:
- ASSETSCOLLECTIONID the name of the FireStore collection grouping all assets documents
- BUCKETNAME name of the Google Cloud Storage bucket where to write JSON files
- OWNERLABELKEYNAME key name for the label identifying the asset owner
- VIOLATIONRESOLVERLABELKEYNAMEkey name for the label identifying the asset violation resolver
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EntryPoint ¶
EntryPoint is the function to be executed for each cloud function occurence
func Initialize ¶
Initialize is to be executed in the init() function of the cloud function to optimize the cold start
Types ¶
type Asset ¶
type Asset struct { Name string `json:"name"` Ancestors []string `json:"ancestors"` AncestorsDisplayName []string `json:"ancestorsDisplayName"` AncestryPath string `json:"ancestryPath"` AncestryPathDisplayName string `json:"ancestryPathDisplayName"` AncestryPathLegacy string `json:"ancestry_path"` AssetType string `json:"assetType"` AssetTypeLegacy string `json:"asset_type"` Origin string `json:"origin"` Owner string `json:"owner"` ViolationResolver string `json:"violationResolver"` Resource json.RawMessage `json:"resource"` IamPolicy map[string]interface{} `json:"iamPolicy"` IamPolicyLegacy map[string]interface{} `json:"iam_policy"` }
Asset Cloud Asset Metadata
Click to show internal directories.
Click to hide internal directories.