app

package
v0.0.0-...-4826c28 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClient

func DefaultClient() *api.Client

func DefaultReporterClient

func DefaultReporterClient() *api.ReporterClient

func DefaultSpanner

func DefaultSpanner(ctx context.Context) (*spanner.Client, error)

func DefaultSpannerURI

func DefaultSpannerURI() (db.ParsedURI, error)

func DefaultStorage

func DefaultStorage(ctx context.Context) (blob.Storage, error)

func Errorf

func Errorf(fmt string, args ...interface{})

func Fatalf

func Fatalf(fmt string, args ...interface{})

Types

type AppConfig

type AppConfig struct {
	// How many workflows are scheduled in parallel.
	ParallelWorkflows int `yaml:"parallelWorkflows"`
	// What Lore archives are to be polled for new patch series.
	LoreArchives []string `yaml:"loreArchives"`
	// Parameters used for sending/generating emails.
	EmailReporting *EmailConfig `yaml:"emailReporting"`
}

func Config

func Config() (*AppConfig, error)

func (AppConfig) Validate

func (c AppConfig) Validate() error

type AppEnvironment

type AppEnvironment struct {
	Spanner     *spanner.Client
	BlobStorage blob.Storage
}

func Environment

func Environment(ctx context.Context) (*AppEnvironment, error)

func TestEnvironment

func TestEnvironment(t *testing.T) (*AppEnvironment, context.Context)

type EmailConfig

type EmailConfig struct {
	// The public name of the system.
	Name string `yaml:"name"`
	// Link to the public documentation.
	DocsLink string `yaml:"docs"`
	// Contact email.
	SupportEmail string `yaml:"supportEmail"`
	// The email from which to send the reports.
	Sender string `yaml:"sender"`
	// Moderation requests will be sent there.
	ModerationList string `yaml:"moderationList"`
	// The list we listen on.
	ArchiveList string `yaml:"archiveList"`
	// Lore git archive to poll for incoming messages.
	LoreArchiveURL string `yaml:"loreArchiveURL"`
}

func (EmailConfig) Validate

func (c EmailConfig) Validate() error

Jump to

Keyboard shortcuts

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