watch

package module
v0.0.0-...-e382889 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 22 Imported by: 0

README

Documentation

Overview

Package watch defines a Cloud Function for watching Cloud Build jobs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildEmail

func BuildEmail(cfg *Config, build *cbpb.Build) ([]byte, error)

BuildEmail constructs an email message describing build per cfg. It is exported so it can be used by the test_email program.

func CreateBadge

func CreateBadge(w io.Writer, build *cbpb.Build) error

CreateBadge creates an SVG badge image for build and writes it to w.

func CreateReport

func CreateReport(w io.Writer, build *cbpb.Build) error

CreateReport writes an HTML document with build's status and timing information to w.

func WatchBuilds

func WatchBuilds(ctx context.Context, msg *pubsub.Message) error

WatchBuilds is a Cloud Function that processes Pub/Sub messages sent by Cloud Build.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config contains the Cloud Function's configuration data. It is exported so it can be used by the test_email program.

func FakeConfig

func FakeConfig(from, to *mail.Address) *Config

FakeConfig returns a minimal Config for use by the test_email program.

Directories

Path Synopsis
Package main is a simple program for testing the rendering of badge images.
Package main is a simple program for testing the rendering of badge images.
Package main is a simple program for testing the formatting of email messages.
Package main is a simple program for testing the formatting of email messages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL