Documentation ¶
Index ¶
- Variables
- type Buganizer
- type Mapping
- type MappingForm
- func (MappingForm) Descriptor() protoreflect.EnumDescriptor
- func (x MappingForm) Enum() *MappingForm
- func (MappingForm) EnumDescriptor() ([]byte, []int)deprecated
- func (x MappingForm) Number() protoreflect.EnumNumber
- func (x MappingForm) String() string
- func (MappingForm) Type() protoreflect.EnumType
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetBuganizer() *Buganizer
- func (x *Metadata) GetBuganizerPublic() *Buganizer
- func (x *Metadata) GetChromeos() *chromeos.ChromeOS
- func (x *Metadata) GetMixins() []string
- func (x *Metadata) GetMonorail() *Monorail
- func (x *Metadata) GetOs() OS
- func (x *Metadata) GetResultdb() *ResultDB
- func (x *Metadata) GetTeamEmail() string
- func (x *Metadata) GetWpt() *WPT
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- type Monorail
- type OS
- type Repo
- type ResultDB
- type Trinary
- type WPT
Constants ¶
This section is empty.
Variables ¶
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.
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.
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.
var File_infra_tools_dirmd_proto_dir_metadata_proto protoreflect.FileDescriptor
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) GetComponentId ¶
func (*Buganizer) ProtoMessage ¶
func (*Buganizer) ProtoMessage()
func (*Buganizer) ProtoReflect ¶
func (x *Buganizer) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Mapping) ProtoMessage()
func (*Mapping) ProtoReflect ¶
func (x *Mapping) ProtoReflect() protoreflect.Message
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) Descriptor() protoreflect.EnumDescriptor
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 ¶
func (MappingForm) Type() protoreflect.EnumType
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) GetBuganizer ¶
func (*Metadata) GetBuganizerPublic ¶
func (*Metadata) GetChromeos ¶
func (*Metadata) GetMonorail ¶
func (*Metadata) GetResultdb ¶
func (*Metadata) GetTeamEmail ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
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) GetComponent ¶
func (*Monorail) GetProject ¶
func (*Monorail) ProtoMessage ¶
func (*Monorail) ProtoMessage()
func (*Monorail) ProtoReflect ¶
func (x *Monorail) ProtoReflect() protoreflect.Message
type OS ¶
type OS int32
Supported OS to tag a directory.
func (OS) Descriptor ¶
func (OS) Descriptor() protoreflect.EnumDescriptor
func (OS) EnumDescriptor
deprecated
func (OS) Number ¶
func (x OS) Number() protoreflect.EnumNumber
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) ProtoMessage ¶
func (*Repo) ProtoMessage()
func (*Repo) ProtoReflect ¶
func (x *Repo) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*ResultDB) ProtoMessage()
func (*ResultDB) ProtoReflect ¶
func (x *ResultDB) ProtoReflect() protoreflect.Message
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.
func (Trinary) Descriptor ¶
func (Trinary) Descriptor() protoreflect.EnumDescriptor
func (Trinary) EnumDescriptor
deprecated
func (Trinary) Number ¶
func (x Trinary) Number() protoreflect.EnumNumber
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) ProtoMessage ¶
func (*WPT) ProtoMessage()
func (*WPT) ProtoReflect ¶
func (x *WPT) ProtoReflect() protoreflect.Message