Documentation ¶
Overview ¶
Package helloworld provides a set of Cloud Functions samples.
Package helloworld provides a set of Cloud Functions samples.
Package helloworld provides a set of Cloud Functions samples.
Package helloworld provides a set of Cloud Functions samples.
Package helloworld provides a set of Cloud Functions samples.
Package helloworld provides a set of Cloud Functions samples.
Index ¶
- func HelloGCS(ctx context.Context, e GCSEvent) error
- func HelloGet(w http.ResponseWriter, r *http.Request)
- func HelloHTTP(w http.ResponseWriter, r *http.Request)
- func HelloLogging(w http.ResponseWriter, r *http.Request)
- func HelloPubSub(ctx context.Context, m PubSubMessage) error
- func HelloRemoteConfig(ctx context.Context, e RemoteConfigEvent) error
- type GCSEvent
- type PubSubMessage
- type RemoteConfigEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HelloGet ¶
func HelloGet(w http.ResponseWriter, r *http.Request)
HelloGet is an HTTP Cloud Function.
func HelloHTTP ¶
func HelloHTTP(w http.ResponseWriter, r *http.Request)
HelloHTTP is an HTTP Cloud Function with a request parameter.
func HelloLogging ¶
func HelloLogging(w http.ResponseWriter, r *http.Request)
HelloLogging logs messages.
func HelloPubSub ¶
func HelloPubSub(ctx context.Context, m PubSubMessage) error
HelloPubSub consumes a Pub/Sub message.
func HelloRemoteConfig ¶
func HelloRemoteConfig(ctx context.Context, e RemoteConfigEvent) error
HelloRemoteConfig handles Firebase Remote Config events.
Types ¶
type GCSEvent ¶
type GCSEvent struct { Kind string `json:"kind"` ID string `json:"id"` SelfLink string `json:"selfLink"` Name string `json:"name"` Bucket string `json:"bucket"` Generation string `json:"generation"` Metageneration string `json:"metageneration"` ContentType string `json:"contentType"` TimeCreated time.Time `json:"timeCreated"` Updated time.Time `json:"updated"` TemporaryHold bool `json:"temporaryHold"` EventBasedHold bool `json:"eventBasedHold"` RetentionExpirationTime time.Time `json:"retentionExpirationTime"` StorageClass string `json:"storageClass"` TimeStorageClassUpdated time.Time `json:"timeStorageClassUpdated"` Size string `json:"size"` MD5Hash string `json:"md5Hash"` MediaLink string `json:"mediaLink"` ContentEncoding string `json:"contentEncoding"` ContentDisposition string `json:"contentDisposition"` CacheControl string `json:"cacheControl"` Metadata map[string]interface{} `json:"metadata"` CRC32C string `json:"crc32c"` ComponentCount int `json:"componentCount"` Etag string `json:"etag"` CustomerEncryption struct { EncryptionAlgorithm string `json:"encryptionAlgorithm"` KeySha256 string `json:"keySha256"` } KMSKeyName string `json:"kmsKeyName"` ResourceState string `json:"resourceState"` }
GCSEvent is the payload of a GCS event.
type PubSubMessage ¶
type PubSubMessage struct {
Data []byte `json:"data"`
}
PubSubMessage is the payload of a Pub/Sub event. See the documentation for more details: https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage
type RemoteConfigEvent ¶
type RemoteConfigEvent struct { UpdateOrigin string `json:"updateOrigin"` UpdateType string `json:"updateType"` UpdateUser struct { Email string `json:"email"` ImageURL string `json:"imageUrl"` Name string `json:"name"` } `json:"updateUser"` VersionNumber string `json:"versionNumber"` }
A RemoteConfigEvent is an event triggered by Firebase Remote Config.