Ir al contenido principal

Entradas

Mostrando entradas de octubre, 2020

Google Cloud Storage: List files with wildcards

One of the most fustrating things when using Google Cloud Storage is not being able to search files using wildcards: Google Cloud web interface only allows stating a file prefix, what in many cases is not enough. Luckly, Google Cloud SDK gsultil ls , also available throught the Google Cloud Console, allows listing storage bucket contents using wildcards. Let's see some examples: Listing all the available buckets gsutil ls Listing a specific bucket content gsutil ls gs://my_bucket Listing, in a specific bucket, all the files matching a classic wilcard pattern As usual, * symbol matches zero or more characters, ? symbol matches only one character. gsutil ls gs://my_bucket/foo*.json gsutil ls gs://my_bucket/*bar.json gsutil ls gs://my_bucket/foo*bar.json gsutil ls gs://my_bucket/foo*.jso? Listing, in a specific bucket, content matching advanced wilcard pattern A set of characters into brackets matches all the filenames that has one of those characters. For i

Go code organization (in a nutshell)

Debugging Google Cloud Functions in Node

DISCLAIMER: This article focuses on Google Cloud Functions with HTTP signature, ie, those functions intended to be triggered by an HTTP request. In case of being interested in Cloud Functions being triggered by Cloud Storage, File Storage or Pub/Sub events, read Debugging Google Cloud Functions with event signature in Node . Cloud Functions, the Function as a Service (FaaS) product of Google Cloud, is an attractive resource for those developing solutions in cloud environments. Similar in conception to AWS Lambdas or Azure Functions, they offer serverless processing at an affordable price. From the developer point of view, they don't differ too much of a standard function contained in a program developed in Node, Python, Go or Java, except for debugging: Due to their ubiquitous nature debugging is not easy and most of the times is done following one of these two approaches: Uploading a debug version, running it and then checking its output (logging and/or funct