Documentation ¶
Overview ¶
Package tricium has a simplified version of Tricium Project Config proto.
Note that some proto messages are modified for simplicity reason as long as it can generate the same text proto as the original Tricium Project Config proto does: https://chromium.googlesource.com/infra/infra/+/HEAD/go/src/infra/tricium/api/v1
Index ¶
- Variables
- type DataType
- type Function
- func (*Function) Descriptor() ([]byte, []int)deprecated
- func (x *Function) GetImpls() []*Impl
- func (x *Function) GetName() string
- func (x *Function) GetNeeds() DataType
- func (x *Function) GetPathFilters() []string
- func (x *Function) GetProvides() DataType
- func (x *Function) GetType() Function_Type
- func (*Function) ProtoMessage()
- func (x *Function) ProtoReflect() protoreflect.Message
- func (x *Function) Reset()
- func (x *Function) String() string
- type Function_Type
- func (Function_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Function_Type) Enum() *Function_Type
- func (Function_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Function_Type) Number() protoreflect.EnumNumber
- func (x Function_Type) String() string
- func (Function_Type) Type() protoreflect.EnumType
- type Impl
- func (*Impl) Descriptor() ([]byte, []int)deprecated
- func (x *Impl) GetProvidesForPlatform() Platform
- func (x *Impl) GetRecipe() *Recipe
- func (x *Impl) GetRuntimePlatform() Platform
- func (*Impl) ProtoMessage()
- func (x *Impl) ProtoReflect() protoreflect.Message
- func (x *Impl) Reset()
- func (x *Impl) String() string
- type Platform
- type ProjectConfig
- func (*ProjectConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectConfig) GetFunctions() []*Function
- func (x *ProjectConfig) GetRepos() []*RepoDetails
- func (x *ProjectConfig) GetSelections() []*Selection
- func (x *ProjectConfig) GetServiceAccount() string
- func (*ProjectConfig) ProtoMessage()
- func (x *ProjectConfig) ProtoReflect() protoreflect.Message
- func (x *ProjectConfig) Reset()
- func (x *ProjectConfig) String() string
- type Recipe
- func (*Recipe) Descriptor() ([]byte, []int)deprecated
- func (x *Recipe) GetBucket() string
- func (x *Recipe) GetBuilder() string
- func (x *Recipe) GetProject() string
- func (*Recipe) ProtoMessage()
- func (x *Recipe) ProtoReflect() protoreflect.Message
- func (x *Recipe) Reset()
- func (x *Recipe) String() string
- type RepoDetails
- func (*RepoDetails) Descriptor() ([]byte, []int)deprecated
- func (x *RepoDetails) GetCheckAllRevisionKinds() bool
- func (x *RepoDetails) GetGerritProject() *RepoDetails_GerritProject
- func (x *RepoDetails) GetWhitelistedGroup() []string
- func (*RepoDetails) ProtoMessage()
- func (x *RepoDetails) ProtoReflect() protoreflect.Message
- func (x *RepoDetails) Reset()
- func (x *RepoDetails) String() string
- type RepoDetails_GerritProject
- func (*RepoDetails_GerritProject) Descriptor() ([]byte, []int)deprecated
- func (x *RepoDetails_GerritProject) GetGitUrl() string
- func (x *RepoDetails_GerritProject) GetHost() string
- func (x *RepoDetails_GerritProject) GetProject() string
- func (*RepoDetails_GerritProject) ProtoMessage()
- func (x *RepoDetails_GerritProject) ProtoReflect() protoreflect.Message
- func (x *RepoDetails_GerritProject) Reset()
- func (x *RepoDetails_GerritProject) String() string
- type Selection
Constants ¶
This section is empty.
Variables ¶
var ( DataType_name = map[int32]string{ 0: "NONE", 1: "GIT_FILE_DETAILS", 2: "RESULTS", } DataType_value = map[string]int32{ "NONE": 0, "GIT_FILE_DETAILS": 1, "RESULTS": 2, } )
Enum value maps for DataType.
var ( Platform_name = map[int32]string{ 0: "UNSPECIFIED", 1: "LINUX", } Platform_value = map[string]int32{ "UNSPECIFIED": 0, "LINUX": 1, } )
Enum value maps for Platform.
var ( Function_Type_name = map[int32]string{ 0: "NONE", 1: "ANALYZER", } Function_Type_value = map[string]int32{ "NONE": 0, "ANALYZER": 1, } )
Enum value maps for Function_Type.
var File_go_chromium_org_luci_cv_api_config_legacy_tricium_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DataType ¶
type DataType int32
All supported data types.
func (DataType) Descriptor ¶
func (DataType) Descriptor() protoreflect.EnumDescriptor
func (DataType) EnumDescriptor
deprecated
func (DataType) Number ¶
func (x DataType) Number() protoreflect.EnumNumber
func (DataType) Type ¶
func (DataType) Type() protoreflect.EnumType
type Function ¶
type Function struct { // The type of this function. Required. // // Should always be ANALYZER. Type Function_Type `protobuf:"varint,1,opt,name=type,proto3,enum=cv.legacy.tricium.Function_Type" json:"type,omitempty"` // The name of the analyzer. Required. // // The name must be unique among Tricium functions within a Tricium instance. // The name is expected to be CamelCase; no spaces, underscores or dashes are // allowed. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Data needed by this analyzer. Required. // // Should always be GIT_FILE_DETAILS. Needs DataType `protobuf:"varint,3,opt,name=needs,proto3,enum=cv.legacy.tricium.DataType" json:"needs,omitempty"` // Data provided by this analyzer. Required. // // Should always be RESULTS. Provides DataType `protobuf:"varint,4,opt,name=provides,proto3,enum=cv.legacy.tricium.DataType" json:"provides,omitempty"` // Path filters for this analyzer. // // Defined as a glob. The path filters only apply to the last part of the // path. PathFilters []string `protobuf:"bytes,5,rep,name=path_filters,json=pathFilters,proto3" json:"path_filters,omitempty"` // Default: "*" // Function implementations. // // Originally the idea was that an analyzer may run on many different // platforms and the comments from different platforms may be merged. // // This was not done in practice, so the number of impls should always be one. Impls []*Impl `protobuf:"bytes,6,rep,name=impls,proto3" json:"impls,omitempty"` // contains filtered or unexported fields }
Tricium analyzer definition.
func (*Function) Descriptor
deprecated
func (*Function) GetPathFilters ¶
func (*Function) GetProvides ¶
func (*Function) GetType ¶
func (x *Function) GetType() Function_Type
func (*Function) ProtoMessage ¶
func (*Function) ProtoMessage()
func (*Function) ProtoReflect ¶
func (x *Function) ProtoReflect() protoreflect.Message
type Function_Type ¶
type Function_Type int32
const ( Function_NONE Function_Type = 0 Function_ANALYZER Function_Type = 1 )
func (Function_Type) Descriptor ¶
func (Function_Type) Descriptor() protoreflect.EnumDescriptor
func (Function_Type) Enum ¶
func (x Function_Type) Enum() *Function_Type
func (Function_Type) EnumDescriptor
deprecated
func (Function_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Function_Type.Descriptor instead.
func (Function_Type) Number ¶
func (x Function_Type) Number() protoreflect.EnumNumber
func (Function_Type) String ¶
func (x Function_Type) String() string
func (Function_Type) Type ¶
func (Function_Type) Type() protoreflect.EnumType
type Impl ¶
type Impl struct { ProvidesForPlatform Platform `` /* 153-byte string literal not displayed */ // The platform to run this implementation on. // // This particular value of this field isn't significant, because // the platform is determined by the builder. RuntimePlatform Platform `` /* 139-byte string literal not displayed */ // Recipe for recipe-based implementation. Recipe *Recipe `protobuf:"bytes,3,opt,name=recipe,proto3" json:"recipe,omitempty"` // contains filtered or unexported fields }
Analyzer implementation.
func (*Impl) Descriptor
deprecated
func (*Impl) GetProvidesForPlatform ¶
func (*Impl) GetRuntimePlatform ¶
func (*Impl) ProtoMessage ¶
func (*Impl) ProtoMessage()
func (*Impl) ProtoReflect ¶
func (x *Impl) ProtoReflect() protoreflect.Message
type Platform ¶
type Platform int32
func (Platform) Descriptor ¶
func (Platform) Descriptor() protoreflect.EnumDescriptor
func (Platform) EnumDescriptor
deprecated
func (Platform) Number ¶
func (x Platform) Number() protoreflect.EnumNumber
func (Platform) Type ¶
func (Platform) Type() protoreflect.EnumType
type ProjectConfig ¶
type ProjectConfig struct { // Analyzer definitions. // // Each analyzer generally corresponds to one builder. Functions []*Function `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty"` // Selection of function implementations to run for this project. // // An analyzer is only enabled if there is a selections entry. Generally all // defined functions are listed as selections. Note that the function // (analyzer) name must match. Selections []*Selection `protobuf:"bytes,2,rep,name=selections,proto3" json:"selections,omitempty"` // Repositories, including Gerrit details. Repos []*RepoDetails `protobuf:"bytes,3,rep,name=repos,proto3" json:"repos,omitempty"` // General service account for this project. ServiceAccount string `protobuf:"bytes,4,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` // contains filtered or unexported fields }
Tricium project configuration.
Specifies details needed to connect a project to Tricium. Adds project-specific functions and selects shared function implementations.
func (*ProjectConfig) Descriptor
deprecated
func (*ProjectConfig) Descriptor() ([]byte, []int)
Deprecated: Use ProjectConfig.ProtoReflect.Descriptor instead.
func (*ProjectConfig) GetFunctions ¶
func (x *ProjectConfig) GetFunctions() []*Function
func (*ProjectConfig) GetRepos ¶
func (x *ProjectConfig) GetRepos() []*RepoDetails
func (*ProjectConfig) GetSelections ¶
func (x *ProjectConfig) GetSelections() []*Selection
func (*ProjectConfig) GetServiceAccount ¶
func (x *ProjectConfig) GetServiceAccount() string
func (*ProjectConfig) ProtoMessage ¶
func (*ProjectConfig) ProtoMessage()
func (*ProjectConfig) ProtoReflect ¶
func (x *ProjectConfig) ProtoReflect() protoreflect.Message
func (*ProjectConfig) Reset ¶
func (x *ProjectConfig) Reset()
func (*ProjectConfig) String ¶
func (x *ProjectConfig) String() string
type Recipe ¶
type Recipe struct { // Project ID, e.g. "chromium". Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` // Bucket name, e.g. "try". Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"` // Builder name, e.g. "linux-rel". Builder string `protobuf:"bytes,3,opt,name=builder,proto3" json:"builder,omitempty"` // contains filtered or unexported fields }
Specification of a recipe for a recipe-based analyzer.
func (*Recipe) Descriptor
deprecated
func (*Recipe) GetBuilder ¶
func (*Recipe) GetProject ¶
func (*Recipe) ProtoMessage ¶
func (*Recipe) ProtoMessage()
func (*Recipe) ProtoReflect ¶
func (x *Recipe) ProtoReflect() protoreflect.Message
type RepoDetails ¶
type RepoDetails struct { GerritProject *RepoDetails_GerritProject `protobuf:"bytes,1,opt,name=gerrit_project,json=gerritProject,proto3" json:"gerrit_project,omitempty"` // Whitelisted groups. // // The owner of a change will be checked for membership of a whitelisted // group. Absence of this field means all groups are whitelisted. // // Group names must be known to the Chrome infra auth service, // https://chrome-infra-auth.appspot.com. Contact a Chromium trooper // if you need to add or modify a group: g.co/bugatrooper. WhitelistedGroup []string `protobuf:"bytes,7,rep,name=whitelisted_group,json=whitelistedGroup,proto3" json:"whitelisted_group,omitempty"` // Whether we want to process REWORK changes (code changes), or all of them // including rebases and changes in the commit message (default run only // on REWORK). Check all the types at: // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#revision-info CheckAllRevisionKinds bool `` /* 129-byte string literal not displayed */ // contains filtered or unexported fields }
Repository details for one repository.
func (*RepoDetails) Descriptor
deprecated
func (*RepoDetails) Descriptor() ([]byte, []int)
Deprecated: Use RepoDetails.ProtoReflect.Descriptor instead.
func (*RepoDetails) GetCheckAllRevisionKinds ¶
func (x *RepoDetails) GetCheckAllRevisionKinds() bool
func (*RepoDetails) GetGerritProject ¶
func (x *RepoDetails) GetGerritProject() *RepoDetails_GerritProject
func (*RepoDetails) GetWhitelistedGroup ¶
func (x *RepoDetails) GetWhitelistedGroup() []string
func (*RepoDetails) ProtoMessage ¶
func (*RepoDetails) ProtoMessage()
func (*RepoDetails) ProtoReflect ¶
func (x *RepoDetails) ProtoReflect() protoreflect.Message
func (*RepoDetails) Reset ¶
func (x *RepoDetails) Reset()
func (*RepoDetails) String ¶
func (x *RepoDetails) String() string
type RepoDetails_GerritProject ¶
type RepoDetails_GerritProject struct { // The Gerrit host to connect to. // // Value must not include the schema part; it will be assumed to be "https". Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Gerrit project name. Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` // Full URL for the corresponding git repo. GitUrl string `protobuf:"bytes,3,opt,name=git_url,json=gitUrl,proto3" json:"git_url,omitempty"` // contains filtered or unexported fields }
Specifies a Gerrit project and its corresponding git repo.
func (*RepoDetails_GerritProject) Descriptor
deprecated
func (*RepoDetails_GerritProject) Descriptor() ([]byte, []int)
Deprecated: Use RepoDetails_GerritProject.ProtoReflect.Descriptor instead.
func (*RepoDetails_GerritProject) GetGitUrl ¶
func (x *RepoDetails_GerritProject) GetGitUrl() string
func (*RepoDetails_GerritProject) GetHost ¶
func (x *RepoDetails_GerritProject) GetHost() string
func (*RepoDetails_GerritProject) GetProject ¶
func (x *RepoDetails_GerritProject) GetProject() string
func (*RepoDetails_GerritProject) ProtoMessage ¶
func (*RepoDetails_GerritProject) ProtoMessage()
func (*RepoDetails_GerritProject) ProtoReflect ¶
func (x *RepoDetails_GerritProject) ProtoReflect() protoreflect.Message
func (*RepoDetails_GerritProject) Reset ¶
func (x *RepoDetails_GerritProject) Reset()
func (*RepoDetails_GerritProject) String ¶
func (x *RepoDetails_GerritProject) String() string
type Selection ¶
type Selection struct { // Name of function to run. Function string `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"` // Name of platform to retrieve results from. Platform Platform `protobuf:"varint,2,opt,name=platform,proto3,enum=cv.legacy.tricium.Platform" json:"platform,omitempty"` // contains filtered or unexported fields }
Selection of function implementations to run for a project.
func (*Selection) Descriptor
deprecated
func (*Selection) GetFunction ¶
func (*Selection) GetPlatform ¶
func (*Selection) ProtoMessage ¶
func (*Selection) ProtoMessage()
func (*Selection) ProtoReflect ¶
func (x *Selection) ProtoReflect() protoreflect.Message