dirmdpb

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OS_name = map[int32]string{
		0: "OS_UNSPECIFIED",
		1: "LINUX",
		2: "WINDOWS",
		3: "MAC",
		4: "ANDROID",
		5: "IOS",
		6: "CHROME_OS",
		7: "FUCHSIA",
	}
	OS_value = map[string]int32{
		"OS_UNSPECIFIED": 0,
		"LINUX":          1,
		"WINDOWS":        2,
		"MAC":            3,
		"ANDROID":        4,
		"IOS":            5,
		"CHROME_OS":      6,
		"FUCHSIA":        7,
	}
)

Enum value maps for OS.

View Source
var (
	Trinary_name = map[int32]string{
		0: "TRINARY_UNSPECIFIED",
		1: "YES",
		2: "NO",
	}
	Trinary_value = map[string]int32{
		"TRINARY_UNSPECIFIED": 0,
		"YES":                 1,
		"NO":                  2,
	}
)

Enum value maps for Trinary.

View Source
var (
	MappingForm_name = map[int32]string{
		0: "ORIGINAL",
		1: "COMPUTED",
		4: "SPARSE",
		2: "FULL",
		3: "REDUCED",
	}
	MappingForm_value = map[string]int32{
		"ORIGINAL": 0,
		"COMPUTED": 1,
		"SPARSE":   4,
		"FULL":     2,
		"REDUCED":  3,
	}
)

Enum value maps for MappingForm.

View Source
var File_infra_tools_dirmd_proto_dir_metadata_proto protoreflect.FileDescriptor
View Source
var File_infra_tools_dirmd_proto_mapping_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Buganizer

type Buganizer struct {

	// The component id. For example, 690873.
	ComponentId int64 `protobuf:"varint,1,opt,name=component_id,json=componentId,proto3" json:"component_id,omitempty"`
	// contains filtered or unexported fields
}

Buganizer specific metadata.

func (*Buganizer) Descriptor deprecated

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

Deprecated: Use Buganizer.ProtoReflect.Descriptor instead.

func (*Buganizer) GetComponentId

func (x *Buganizer) GetComponentId() int64

func (*Buganizer) ProtoMessage

func (*Buganizer) ProtoMessage()

func (*Buganizer) ProtoReflect

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

func (*Buganizer) Reset

func (x *Buganizer) Reset()

func (*Buganizer) String

func (x *Buganizer) String() string

type Mapping

type Mapping struct {

	// Dirs maps from a directory to its metadata.
	//
	// The key is directory name, relative to the root.
	// The key must use forward slash as directory separator.
	// The key must be clean: https://pkg.go.dev/path?tab=doc#Clean
	// Special key "." represents the root directory.
	//
	// The root must be known from the context where Mapping is used and is not
	// part of the this message.
	Dirs map[string]*Metadata `` /* 149-byte string literal not displayed */
	// Repos contains information about the repositories that Mapping.dirs were
	// read from. Repos can be used to tell which repository a given directory
	// came from. Also it contains loaded mixins, referred to by Mapping.mixins.
	//
	// The map key is slash-separated path relative to the root repo.
	// Examples:
	// - If there is only one repo, then the only key is ".".
	// - If the root repo is "~/chromium/src" and it contains subrepo
	//   "~/chromium/src/v8", then Mapping.repos will have keys "." and "v8".
	//   In this case Mapping.dirs key "foo/bar" will correspond to Repo key ".",
	//   while "v8/baz" will correspond to Repo key "v8".
	Repos map[string]*Repo `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

Maps from a directory to its metadata.

func (*Mapping) Descriptor deprecated

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

Deprecated: Use Mapping.ProtoReflect.Descriptor instead.

func (*Mapping) GetDirs

func (x *Mapping) GetDirs() map[string]*Metadata

func (*Mapping) GetRepos

func (x *Mapping) GetRepos() map[string]*Repo

func (*Mapping) ProtoMessage

func (*Mapping) ProtoMessage()

func (*Mapping) ProtoReflect

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

func (*Mapping) Reset

func (x *Mapping) Reset()

func (*Mapping) String

func (x *Mapping) String() string

type MappingForm

type MappingForm int32

A known form of the Mapping.

const (
	// The mapping represents the metadata files as is.
	// The metadata messages in Mapping.Dirs does not include inherited or
	// mixed-in metadata.
	MappingForm_ORIGINAL MappingForm = 0
	// Like ORIGINAL, but each Mapping.Dirs entry includes inherited and mixed-in
	//  metadata.
	//
	// To avoid accidental double importing, Metadata.mixins field is cleared
	// in the COMPUTED form.
	MappingForm_COMPUTED MappingForm = 1
	// Like COMPUTED, but the mapping contains metadata only for the explicitly
	// specified directories. For example, if metadata was requested for
	// directories "foo/bar" and "foo/baz", then the mapping will contain only
	// them, and not include "foo" or "foo/bar/qux".
	//
	// Typically reading a sparse mapping is much faster.
	MappingForm_SPARSE MappingForm = 4
	// Like COMPUTED, but a Mapping.Dirs entry exists even if the directory does
	// not define its own, directory-specific metadata.
	// This is the most verbose/redundant form.
	MappingForm_FULL MappingForm = 2
	// Like ORIGINAL, but all the redundant metadata is removed.
	// For example, it is redundant to specify the same value for the same
	// metadata attribute in both "a" and "a/b".
	// It is also redundant to have a Mapping.Dirs entry with empty metadata.
	// This is the most compact form without a dataloss.
	MappingForm_REDUCED MappingForm = 3
)

func (MappingForm) Descriptor

func (MappingForm) Enum

func (x MappingForm) Enum() *MappingForm

func (MappingForm) EnumDescriptor deprecated

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

Deprecated: Use MappingForm.Descriptor instead.

func (MappingForm) Number

func (x MappingForm) Number() protoreflect.EnumNumber

func (MappingForm) String

func (x MappingForm) String() string

func (MappingForm) Type

type Metadata

type Metadata struct {

	// Paths to Metadata files to import into this file.
	//
	// A mixin is imported AS IS, without inheritance from its ancestors.
	// To prevent confusion, a mixin's base name may not be DIR_METADATA.
	// Instead, the file name must entail its scope, e.g. the software component
	// that it is describing.
	//
	// Mixins can be useful to reduce duplication of metadata across the repo.
	// For example in Java, implementation and tests of the same feature live in
	// different directories. Common metadata can be placed in a mixin, and then
	// imported by DIR_METADATA files in both directories.
	//
	// A path must be source-absolute, e.g. "//components/autofill/COMMON_METADATA"
	// Here the root is the root of the repository which contains the current
	// file.
	//
	// Precedence:
	// * Mixins override values in the parent directory.
	// * The order of mixins is significant: if the same attribute is defined in
	//   two mixins, then the later one wins.
	// * Values defined in the importee override values in the mixins.
	//
	// Importing mixins in mixins is not supported.
	// Only DIR_METADATA files are allowed to use this field.
	Mixins []string `protobuf:"bytes,10,rep,name=mixins,proto3" json:"mixins,omitempty"`
	// Monorail metadata. Its component field should always map to the same
	// team_email field (see below) for every directory that it is listed in.
	Monorail *Monorail `protobuf:"bytes,1,opt,name=monorail,proto3" json:"monorail,omitempty"`
	// The team responsible for the directory. Only a single email is allowed.
	// For example, “team-email@chromium.org”.
	TeamEmail string `protobuf:"bytes,2,opt,name=team_email,json=teamEmail,proto3" json:"team_email,omitempty"`
	// The code in this directory is specific to this OS.
	Os OS `protobuf:"varint,3,opt,name=os,proto3,enum=chrome.dir_metadata.OS" json:"os,omitempty"`
	// WPT-specific metadata.
	Wpt *WPT `protobuf:"bytes,4,opt,name=wpt,proto3" json:"wpt,omitempty"`
	// Private buganizer metadata.
	Buganizer *Buganizer `protobuf:"bytes,5,opt,name=buganizer,proto3" json:"buganizer,omitempty"`
	// ResultDB tags.
	Resultdb *ResultDB `protobuf:"bytes,6,opt,name=resultdb,proto3" json:"resultdb,omitempty"`
	// Public buganizer metadata.
	BuganizerPublic *Buganizer `protobuf:"bytes,7,opt,name=buganizer_public,json=buganizerPublic,proto3" json:"buganizer_public,omitempty"`
	// ChromeOS specific metadata.
	Chromeos *chromeos.ChromeOS `protobuf:"bytes,9,opt,name=chromeos,proto3" json:"chromeos,omitempty"`
	// contains filtered or unexported fields
}

Metadata information for a directory.

Individual fields/subfields are inherited by subdirectories. For example, if a/DIR_METADATA specifies `monorail.project="chromium"` and a/b/DIR_METADATA file exists and does not specify `monorail.project`, then `a/b`'s Monorail project is "chromium". Note: this semantics can be extended to opt-out individual fields from inheritance.

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetBuganizer

func (x *Metadata) GetBuganizer() *Buganizer

func (*Metadata) GetBuganizerPublic

func (x *Metadata) GetBuganizerPublic() *Buganizer

func (*Metadata) GetChromeos

func (x *Metadata) GetChromeos() *chromeos.ChromeOS

func (*Metadata) GetMixins

func (x *Metadata) GetMixins() []string

func (*Metadata) GetMonorail

func (x *Metadata) GetMonorail() *Monorail

func (*Metadata) GetOs

func (x *Metadata) GetOs() OS

func (*Metadata) GetResultdb

func (x *Metadata) GetResultdb() *ResultDB

func (*Metadata) GetTeamEmail

func (x *Metadata) GetTeamEmail() string

func (*Metadata) GetWpt

func (x *Metadata) GetWpt() *WPT

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type Monorail

type Monorail struct {

	// The Monorail project. For example, “chromium”.
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	// The Monorail component. For example, “UI>Browser>Zoom”.
	// Only a single component is allowed.
	Component string `protobuf:"bytes,2,opt,name=component,proto3" json:"component,omitempty"`
	// contains filtered or unexported fields
}

Monorail specific metadata.

func (*Monorail) Descriptor deprecated

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

Deprecated: Use Monorail.ProtoReflect.Descriptor instead.

func (*Monorail) GetComponent

func (x *Monorail) GetComponent() string

func (*Monorail) GetProject

func (x *Monorail) GetProject() string

func (*Monorail) ProtoMessage

func (*Monorail) ProtoMessage()

func (*Monorail) ProtoReflect

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

func (*Monorail) Reset

func (x *Monorail) Reset()

func (*Monorail) String

func (x *Monorail) String() string

type OS

type OS int32

Supported OS to tag a directory.

const (
	OS_OS_UNSPECIFIED OS = 0
	OS_LINUX          OS = 1
	OS_WINDOWS        OS = 2
	OS_MAC            OS = 3
	OS_ANDROID        OS = 4
	OS_IOS            OS = 5
	OS_CHROME_OS      OS = 6
	OS_FUCHSIA        OS = 7
)

func (OS) Descriptor

func (OS) Descriptor() protoreflect.EnumDescriptor

func (OS) Enum

func (x OS) Enum() *OS

func (OS) EnumDescriptor deprecated

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

Deprecated: Use OS.Descriptor instead.

func (OS) Number

func (x OS) Number() protoreflect.EnumNumber

func (OS) String

func (x OS) String() string

func (OS) Type

func (OS) Type() protoreflect.EnumType

type Repo

type Repo struct {

	// Mixins are metadata files referred to by Metadata.mixins in Mapping.dirs.
	// The map keys are Metadata.mixins elements, see that field comment.
	// A valid Mapping contains a Repo.mixins entry for each
	// Metadata.mixins entry in Mapping.dirs, for directories that reside in
	// this repo.
	Mixins map[string]*Metadata `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

Information about the repository that metadata was read from.

func (*Repo) Descriptor deprecated

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

Deprecated: Use Repo.ProtoReflect.Descriptor instead.

func (*Repo) GetMixins

func (x *Repo) GetMixins() map[string]*Metadata

func (*Repo) ProtoMessage

func (*Repo) ProtoMessage()

func (*Repo) ProtoReflect

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

func (*Repo) Reset

func (x *Repo) Reset()

func (*Repo) String

func (x *Repo) String() string

type ResultDB

type ResultDB struct {

	// A list of tags to be attached to results of tests defined in a directory.
	// Each tag must be formatted as "key:value", and keys can be repeated.
	Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

ResultDB contains a list of tags to be attached to results of tests defined in a directory.

func (*ResultDB) Descriptor deprecated

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

Deprecated: Use ResultDB.ProtoReflect.Descriptor instead.

func (*ResultDB) GetTags

func (x *ResultDB) GetTags() []string

func (*ResultDB) ProtoMessage

func (*ResultDB) ProtoMessage()

func (*ResultDB) ProtoReflect

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

func (*ResultDB) Reset

func (x *ResultDB) Reset()

func (*ResultDB) String

func (x *ResultDB) String() string

type Trinary

type Trinary int32

Trinary is a tri-state boolean.

It is convenient for conceptually-boolean fields that need inheritance. Plain bool does not work well because proto3 does not distinguish between false and absence of the value. Unlike bool, the default value of Trinary is TRINARY_UNSPECIFIED which is different from NO.

Unfortunately the JSON representation are strings "YES" and "NO", as opposed to more natural true and false. The alternative to Trinary is BoolValue https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto#L101 which has JSON representation as `true` and `false`, but then the text-proto representation is verbose: `wpt { notify { value: true }}`. Given that we will have more DIR_METADATA files than code that interprets the files, we make a choice in favor of clean DIR_METADATA files.

const (
	Trinary_TRINARY_UNSPECIFIED Trinary = 0
	Trinary_YES                 Trinary = 1
	Trinary_NO                  Trinary = 2
)

func (Trinary) Descriptor

func (Trinary) Descriptor() protoreflect.EnumDescriptor

func (Trinary) Enum

func (x Trinary) Enum() *Trinary

func (Trinary) EnumDescriptor deprecated

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

Deprecated: Use Trinary.Descriptor instead.

func (Trinary) Number

func (x Trinary) Number() protoreflect.EnumNumber

func (Trinary) String

func (x Trinary) String() string

func (Trinary) Type

func (Trinary) Type() protoreflect.EnumType

type WPT

type WPT struct {

	// Whether wpt-importer should notify the team about new failures.
	Notify Trinary `protobuf:"varint,1,opt,name=notify,proto3,enum=chrome.dir_metadata.Trinary" json:"notify,omitempty"`
	// contains filtered or unexported fields
}

WPT is WebPlatformTest-specific metadata.

func (*WPT) Descriptor deprecated

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

Deprecated: Use WPT.ProtoReflect.Descriptor instead.

func (*WPT) GetNotify

func (x *WPT) GetNotify() Trinary

func (*WPT) ProtoMessage

func (*WPT) ProtoMessage()

func (*WPT) ProtoReflect

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

func (*WPT) Reset

func (x *WPT) Reset()

func (*WPT) String

func (x *WPT) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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