annopb

package
Version: v0.0.0-...-1a9397f Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Overview

Package annopb contains protobuf definitions for legacy annotation.

The package name here must match the protobuf package name, as the generated files will reside in the same directory.

Index

Constants

View Source
const ContentTypeAnnotations = "text/x-chrome-infra-annotations; version=2"

ContentTypeAnnotations is a stream content type for annotation streams.

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "RUNNING",
		1: "SUCCESS",
		2: "FAILURE",
		3: "PENDING",
	}
	Status_value = map[string]int32{
		"RUNNING": 0,
		"SUCCESS": 1,
		"FAILURE": 2,
		"PENDING": 3,
	}
)

Enum value maps for Status.

View Source
var (
	FailureDetails_Type_name = map[int32]string{
		0: "GENERAL",
		1: "EXCEPTION",
		2: "INFRA",
		3: "DM_DEPENDENCY_FAILED",
		4: "CANCELLED",
		5: "EXPIRED",
	}
	FailureDetails_Type_value = map[string]int32{
		"GENERAL":              0,
		"EXCEPTION":            1,
		"INFRA":                2,
		"DM_DEPENDENCY_FAILED": 3,
		"CANCELLED":            4,
		"EXPIRED":              5,
	}
)

Enum value maps for FailureDetails_Type.

View Source
var File_go_chromium_org_luci_luciexe_legacy_annotee_proto_annotations_proto protoreflect.FileDescriptor

Functions

func ExtractProperties

func ExtractProperties(s *Step) (*structpb.Struct, error)

ExtractProperties returns a flat list of properties from a tree of steps. If multiple step nodes have a property of the same name, the last one in the preorder traversal wins.

Types

type AnnotationLink struct {

	// An optional display label for the link.
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// If present, this link is an alias for another link with this name, and
	// should be rendered in relation to that link.
	AliasLabel string `protobuf:"bytes,2,opt,name=alias_label,json=aliasLabel,proto3" json:"alias_label,omitempty"`
	// Types that are assignable to Value:
	//	*AnnotationLink_Url
	//	*AnnotationLink_LogdogStream
	//	*AnnotationLink_IsolateObject
	//	*AnnotationLink_DmLink
	Value isAnnotationLink_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

A Link is an optional label followed by a typed link to an external resource.

func (*AnnotationLink) Descriptor deprecated

func (*AnnotationLink) Descriptor() ([]byte, []int)

Deprecated: Use AnnotationLink.ProtoReflect.Descriptor instead.

func (*AnnotationLink) GetAliasLabel

func (x *AnnotationLink) GetAliasLabel() string
func (x *AnnotationLink) GetDmLink() *DMLink

func (*AnnotationLink) GetIsolateObject

func (x *AnnotationLink) GetIsolateObject() *IsolateObject

func (*AnnotationLink) GetLabel

func (x *AnnotationLink) GetLabel() string

func (*AnnotationLink) GetLogdogStream

func (x *AnnotationLink) GetLogdogStream() *LogdogStream

func (*AnnotationLink) GetUrl

func (x *AnnotationLink) GetUrl() string

func (*AnnotationLink) GetValue

func (m *AnnotationLink) GetValue() isAnnotationLink_Value

func (*AnnotationLink) ProtoMessage

func (*AnnotationLink) ProtoMessage()

func (*AnnotationLink) ProtoReflect

func (x *AnnotationLink) ProtoReflect() protoreflect.Message

func (*AnnotationLink) Reset

func (x *AnnotationLink) Reset()

func (*AnnotationLink) String

func (x *AnnotationLink) String() string
type AnnotationLink_DmLink struct {
	// (One of) A link to a Dungeon Master object.
	DmLink *DMLink `protobuf:"bytes,6,opt,name=dm_link,json=dmLink,proto3,oneof"`
}
type AnnotationLink_IsolateObject struct {
	// (One of) An isolate server link.
	IsolateObject *IsolateObject `protobuf:"bytes,5,opt,name=isolate_object,json=isolateObject,proto3,oneof"`
}
type AnnotationLink_LogdogStream struct {
	// (One of) A LogDog stream link.
	LogdogStream *LogdogStream `protobuf:"bytes,4,opt,name=logdog_stream,json=logdogStream,proto3,oneof"`
}
type AnnotationLink_Url struct {
	// A URL.
	Url string `protobuf:"bytes,3,opt,name=url,proto3,oneof"`
}
type DMLink struct {

	// The Dungeon Master server. If empty, this is the default Isolate server
	// specified by the project's LUCI config.
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// The quest name.
	Quest string `protobuf:"bytes,2,opt,name=quest,proto3" json:"quest,omitempty"`
	// The attempt number.
	Attempt int64 `protobuf:"varint,3,opt,name=attempt,proto3" json:"attempt,omitempty"`
	// The execution number.
	Execution int64 `protobuf:"varint,4,opt,name=execution,proto3" json:"execution,omitempty"`
	// contains filtered or unexported fields
}

DMLink is a Dungeon Master execution specification.

func (*DMLink) Descriptor deprecated

func (*DMLink) Descriptor() ([]byte, []int)

Deprecated: Use DMLink.ProtoReflect.Descriptor instead.

func (*DMLink) GetAttempt

func (x *DMLink) GetAttempt() int64

func (*DMLink) GetExecution

func (x *DMLink) GetExecution() int64

func (*DMLink) GetQuest

func (x *DMLink) GetQuest() string

func (*DMLink) GetServer

func (x *DMLink) GetServer() string

func (*DMLink) ProtoMessage

func (*DMLink) ProtoMessage()

func (*DMLink) ProtoReflect

func (x *DMLink) ProtoReflect() protoreflect.Message

func (*DMLink) Reset

func (x *DMLink) Reset()

func (*DMLink) String

func (x *DMLink) String() string

type FailureDetails

type FailureDetails struct {
	Type FailureDetails_Type `protobuf:"varint,1,opt,name=type,proto3,enum=annotation.FailureDetails_Type" json:"type,omitempty"`
	// An optional string describing the failure.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// If the failure type is DEPENDENCY_FAILED, the failed dependencies should be
	// listed here.
	FailedDmDependency []*DMLink `protobuf:"bytes,3,rep,name=failed_dm_dependency,json=failedDmDependency,proto3" json:"failed_dm_dependency,omitempty"`
	// contains filtered or unexported fields
}

FailureType provides more details on the nature of the Status.

func (*FailureDetails) Descriptor deprecated

func (*FailureDetails) Descriptor() ([]byte, []int)

Deprecated: Use FailureDetails.ProtoReflect.Descriptor instead.

func (*FailureDetails) GetFailedDmDependency

func (x *FailureDetails) GetFailedDmDependency() []*DMLink

func (*FailureDetails) GetText

func (x *FailureDetails) GetText() string

func (*FailureDetails) GetType

func (x *FailureDetails) GetType() FailureDetails_Type

func (*FailureDetails) ProtoMessage

func (*FailureDetails) ProtoMessage()

func (*FailureDetails) ProtoReflect

func (x *FailureDetails) ProtoReflect() protoreflect.Message

func (*FailureDetails) Reset

func (x *FailureDetails) Reset()

func (*FailureDetails) String

func (x *FailureDetails) String() string

type FailureDetails_Type

type FailureDetails_Type int32

Type is the type of failure.

const (
	// The failure is a general failure.
	FailureDetails_GENERAL FailureDetails_Type = 0
	// An unhandled exception occurred during execution.
	FailureDetails_EXCEPTION FailureDetails_Type = 1
	// The failure is related to a failed infrastructure component, not an error
	// with the Step itself.
	FailureDetails_INFRA FailureDetails_Type = 2
	// The failure is due to a failed Dungeon Master dependency. This should be
	// used if a Step's external depdendency fails and the Step cannot recover
	// or proceed without it.
	FailureDetails_DM_DEPENDENCY_FAILED FailureDetails_Type = 3
	// The step was cancelled.
	FailureDetails_CANCELLED FailureDetails_Type = 4
	// The failure was due to an resource exhausion. The step was scheduled
	// but never ran, and never will run.
	FailureDetails_EXPIRED FailureDetails_Type = 5
)

func (FailureDetails_Type) Descriptor

func (FailureDetails_Type) Enum

func (FailureDetails_Type) EnumDescriptor deprecated

func (FailureDetails_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use FailureDetails_Type.Descriptor instead.

func (FailureDetails_Type) Number

func (FailureDetails_Type) String

func (x FailureDetails_Type) String() string

func (FailureDetails_Type) Type

type IsolateObject

type IsolateObject struct {

	// The Isolate server. If empty, this is the default Isolate server specified
	// by the project's LUCI config.
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// The isolate object hash.
	Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

IsolateObject is an Isolate service object specification.

func (*IsolateObject) Descriptor deprecated

func (*IsolateObject) Descriptor() ([]byte, []int)

Deprecated: Use IsolateObject.ProtoReflect.Descriptor instead.

func (*IsolateObject) GetHash

func (x *IsolateObject) GetHash() string

func (*IsolateObject) GetServer

func (x *IsolateObject) GetServer() string

func (*IsolateObject) ProtoMessage

func (*IsolateObject) ProtoMessage()

func (*IsolateObject) ProtoReflect

func (x *IsolateObject) ProtoReflect() protoreflect.Message

func (*IsolateObject) Reset

func (x *IsolateObject) Reset()

func (*IsolateObject) String

func (x *IsolateObject) String() string

type LogdogStream

type LogdogStream struct {

	// The stream's server. If omitted, the server is the same server that this
	// annotation stream is homed on.
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// The log Prefix. If empty, the prefix is the same prefix as this annotation
	// stream.
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// The log name.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

LogdogStream is a LogDog stream link.

func (*LogdogStream) Descriptor deprecated

func (*LogdogStream) Descriptor() ([]byte, []int)

Deprecated: Use LogdogStream.ProtoReflect.Descriptor instead.

func (*LogdogStream) GetName

func (x *LogdogStream) GetName() string

func (*LogdogStream) GetPrefix

func (x *LogdogStream) GetPrefix() string

func (*LogdogStream) GetServer

func (x *LogdogStream) GetServer() string

func (*LogdogStream) ProtoMessage

func (*LogdogStream) ProtoMessage()

func (*LogdogStream) ProtoReflect

func (x *LogdogStream) ProtoReflect() protoreflect.Message

func (*LogdogStream) Reset

func (x *LogdogStream) Reset()

func (*LogdogStream) String

func (x *LogdogStream) String() string

type Status

type Status int32

Status is the expressed root step of this step or substep.

const (
	// The step is still running.
	Status_RUNNING Status = 0
	// The step has finished successfully.
	Status_SUCCESS Status = 1
	// The step has finished unsuccessfully.
	Status_FAILURE Status = 2
	// The step has been scheduled, but not yet started.
	Status_PENDING Status = 3
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type Step

type Step struct {

	// The display name of the Component.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The command-line invocation of the step, expressed as an argument vector.
	Command *Step_Command `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	// The current running status of the Step.
	Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=annotation.Status" json:"status,omitempty"`
	// Optional information detailing the failure. This may be populated if the
	// Step's top-level command Status is set to FAILURE.
	FailureDetails *FailureDetails `protobuf:"bytes,4,opt,name=failure_details,json=failureDetails,proto3" json:"failure_details,omitempty"`
	// Substeps that this Step is composed of.
	Substep []*Step_Substep `protobuf:"bytes,5,rep,name=substep,proto3" json:"substep,omitempty"`
	// A link to this Step's STDOUT stream, if present.
	StdoutStream *LogdogStream `protobuf:"bytes,6,opt,name=stdout_stream,json=stdoutStream,proto3" json:"stdout_stream,omitempty"`
	// A link to this Step's STDERR stream, if present.
	StderrStream *LogdogStream `protobuf:"bytes,7,opt,name=stderr_stream,json=stderrStream,proto3" json:"stderr_stream,omitempty"`
	// When the step started, expressed as an RFC3339 string using Z (UTC)
	// timezone.
	Started *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=started,proto3" json:"started,omitempty"`
	// When the step ended, expressed as an RFC3339 string using Z (UTC) timezone.
	Ended *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=ended,proto3" json:"ended,omitempty"`
	// Arbitrary lines of component text. Each string here is a consecutive line,
	// and should not contain newlines.
	Text []string `protobuf:"bytes,20,rep,name=text,proto3" json:"text,omitempty"`
	// The Component's progress.
	Progress *Step_Progress `protobuf:"bytes,21,opt,name=progress,proto3" json:"progress,omitempty"`
	// The primary link for this Component. This is the link that interaction
	// with the Component will use.
	Link *AnnotationLink `protobuf:"bytes,22,opt,name=link,proto3" json:"link,omitempty"`
	// Additional links related to the Component. These will be rendered alongside
	// the component.
	OtherLinks []*AnnotationLink `protobuf:"bytes,23,rep,name=other_links,json=otherLinks,proto3" json:"other_links,omitempty"`
	Property   []*Step_Property  `protobuf:"bytes,24,rep,name=property,proto3" json:"property,omitempty"`
	// Maps the name of the Manifest, e.g. UNPATCHED, INFRA, etc. to the
	// ManifestLink. This name will be used in the milo console definition to
	// indicate which manifest data to sort the console view by.
	SourceManifests map[string]*srcman.ManifestLink `` /* 195-byte string literal not displayed */
	// contains filtered or unexported fields
}

Generic step or substep state.

func (*Step) Descriptor deprecated

func (*Step) Descriptor() ([]byte, []int)

Deprecated: Use Step.ProtoReflect.Descriptor instead.

func (*Step) GetCommand

func (x *Step) GetCommand() *Step_Command

func (*Step) GetEnded

func (x *Step) GetEnded() *timestamppb.Timestamp

func (*Step) GetFailureDetails

func (x *Step) GetFailureDetails() *FailureDetails
func (x *Step) GetLink() *AnnotationLink

func (*Step) GetName

func (x *Step) GetName() string
func (x *Step) GetOtherLinks() []*AnnotationLink

func (*Step) GetProgress

func (x *Step) GetProgress() *Step_Progress

func (*Step) GetProperty

func (x *Step) GetProperty() []*Step_Property

func (*Step) GetSourceManifests

func (x *Step) GetSourceManifests() map[string]*srcman.ManifestLink

func (*Step) GetStarted

func (x *Step) GetStarted() *timestamppb.Timestamp

func (*Step) GetStatus

func (x *Step) GetStatus() Status

func (*Step) GetStderrStream

func (x *Step) GetStderrStream() *LogdogStream

func (*Step) GetStdoutStream

func (x *Step) GetStdoutStream() *LogdogStream

func (*Step) GetSubstep

func (x *Step) GetSubstep() []*Step_Substep

func (*Step) GetText

func (x *Step) GetText() []string

func (*Step) ProtoMessage

func (*Step) ProtoMessage()

func (*Step) ProtoReflect

func (x *Step) ProtoReflect() protoreflect.Message

func (*Step) Reset

func (x *Step) Reset()

func (*Step) String

func (x *Step) String() string

type Step_Command

type Step_Command struct {

	// The command-line invocation, expressed as an argument vector.
	CommandLine []string `protobuf:"bytes,1,rep,name=command_line,json=commandLine,proto3" json:"command_line,omitempty"`
	// The current working directory.
	Cwd string `protobuf:"bytes,2,opt,name=cwd,proto3" json:"cwd,omitempty"`
	// Environment represents the state of a process' environment.
	Environ map[string]string `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

Command contains information about a command-line invocation.

func (*Step_Command) Descriptor deprecated

func (*Step_Command) Descriptor() ([]byte, []int)

Deprecated: Use Step_Command.ProtoReflect.Descriptor instead.

func (*Step_Command) GetCommandLine

func (x *Step_Command) GetCommandLine() []string

func (*Step_Command) GetCwd

func (x *Step_Command) GetCwd() string

func (*Step_Command) GetEnviron

func (x *Step_Command) GetEnviron() map[string]string

func (*Step_Command) ProtoMessage

func (*Step_Command) ProtoMessage()

func (*Step_Command) ProtoReflect

func (x *Step_Command) ProtoReflect() protoreflect.Message

func (*Step_Command) Reset

func (x *Step_Command) Reset()

func (*Step_Command) String

func (x *Step_Command) String() string

type Step_Progress

type Step_Progress struct {

	// The total number of progress units. If missing or zero, no progress is
	// expressed.
	Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	// The number of completed progress units. This must always be less than or
	// equal to `total`. If omitted, it is implied to be zero.
	Completed int32 `protobuf:"varint,2,opt,name=completed,proto3" json:"completed,omitempty"`
	// contains filtered or unexported fields
}

Progress expresses a Component's overall progress. It does this using arbitrary "progress units", which are discrete units of work measured by the Component that are either completed or not completed.

A simple construction for "percentage complete" is to set `total` to 100 and `completed` to the percentage value.

func (*Step_Progress) Descriptor deprecated

func (*Step_Progress) Descriptor() ([]byte, []int)

Deprecated: Use Step_Progress.ProtoReflect.Descriptor instead.

func (*Step_Progress) GetCompleted

func (x *Step_Progress) GetCompleted() int32

func (*Step_Progress) GetTotal

func (x *Step_Progress) GetTotal() int32

func (*Step_Progress) ProtoMessage

func (*Step_Progress) ProtoMessage()

func (*Step_Progress) ProtoReflect

func (x *Step_Progress) ProtoReflect() protoreflect.Message

func (*Step_Progress) Reset

func (x *Step_Progress) Reset()

func (*Step_Progress) String

func (x *Step_Progress) String() string

type Step_Property

type Step_Property struct {

	// name is the property name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// value is the optional property value.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Property is an arbitrary key/value (build) property.

func (*Step_Property) Descriptor deprecated

func (*Step_Property) Descriptor() ([]byte, []int)

Deprecated: Use Step_Property.ProtoReflect.Descriptor instead.

func (*Step_Property) GetName

func (x *Step_Property) GetName() string

func (*Step_Property) GetValue

func (x *Step_Property) GetValue() string

func (*Step_Property) ProtoMessage

func (*Step_Property) ProtoMessage()

func (*Step_Property) ProtoReflect

func (x *Step_Property) ProtoReflect() protoreflect.Message

func (*Step_Property) Reset

func (x *Step_Property) Reset()

func (*Step_Property) String

func (x *Step_Property) String() string

type Step_Substep

type Step_Substep struct {

	// The substep.
	//
	// Types that are assignable to Substep:
	//	*Step_Substep_Step
	//	*Step_Substep_AnnotationStream
	Substep isStep_Substep_Substep `protobuf_oneof:"substep"`
	// contains filtered or unexported fields
}

Sub-steps nested underneath of this step.

func (*Step_Substep) Descriptor deprecated

func (*Step_Substep) Descriptor() ([]byte, []int)

Deprecated: Use Step_Substep.ProtoReflect.Descriptor instead.

func (*Step_Substep) GetAnnotationStream

func (x *Step_Substep) GetAnnotationStream() *LogdogStream

func (*Step_Substep) GetStep

func (x *Step_Substep) GetStep() *Step

func (*Step_Substep) GetSubstep

func (m *Step_Substep) GetSubstep() isStep_Substep_Substep

func (*Step_Substep) ProtoMessage

func (*Step_Substep) ProtoMessage()

func (*Step_Substep) ProtoReflect

func (x *Step_Substep) ProtoReflect() protoreflect.Message

func (*Step_Substep) Reset

func (x *Step_Substep) Reset()

func (*Step_Substep) String

func (x *Step_Substep) String() string

type Step_Substep_AnnotationStream

type Step_Substep_AnnotationStream struct {
	// The substep is a separate LogDog annotation stream.
	AnnotationStream *LogdogStream `protobuf:"bytes,2,opt,name=annotation_stream,json=annotationStream,proto3,oneof"`
}

type Step_Substep_Step

type Step_Substep_Step struct {
	// The substep is an inline Step.
	Step *Step `protobuf:"bytes,1,opt,name=step,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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