pbutil

package
v0.0.0-...-864d242 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package pbutil contains methods for manipulating protobufs.

Index

Constants

View Source
const (
	// TreeIDExpression is a partial regular expression that validates tree identifiers.
	TreeIDExpression = `[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?`
	// StatusIDExpression is a partial regular expression that validates status identifiers.
	StatusIDExpression = `[0-9a-f]{32}`
	// BuilderNameExpression is a partial regular expression that validates builder name.
	BuilderNameExpression = `projects/([a-z0-9\-_]{1,40})/buckets/([a-z0-9\-_.]{1,100})/builders/([a-zA-Z0-9\-_.\(\) ]{1,128})`
	// ProjectExpression is a partial regular expression that validates LUCI Project.
	ProjectExpression = `[a-z0-9\-]{1,40}`
	// TreeNameExpression is a partial regular expression that validates tree name.
	TreeNameExpression = `trees/(` + TreeIDExpression + `)`
)

Variables

This section is empty.

Functions

func ParseTreeName

func ParseTreeName(treeName string) (treeID string, err error)

func ValidateClosingBuilderName

func ValidateClosingBuilderName(name string) error

func ValidateGeneralStatus

func ValidateGeneralStatus(state pb.GeneralState) error

func ValidateMessage

func ValidateMessage(message string) error

func ValidateProject

func ValidateProject(project string) error

func ValidateStatusID

func ValidateStatusID(id string) error

func ValidateTreeID

func ValidateTreeID(treeName string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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