tricium

package
v0.0.0-...-8ff35f7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

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

Constants

This section is empty.

Variables

View Source
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.

View Source
var (
	Platform_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "LINUX",
	}
	Platform_value = map[string]int32{
		"UNSPECIFIED": 0,
		"LINUX":       1,
	}
)

Enum value maps for Platform.

View Source
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.

View Source
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.

const (
	DataType_NONE             DataType = 0
	DataType_GIT_FILE_DETAILS DataType = 1
	DataType_RESULTS          DataType = 2
)

func (DataType) Descriptor

func (DataType) Descriptor() protoreflect.EnumDescriptor

func (DataType) Enum

func (x DataType) Enum() *DataType

func (DataType) EnumDescriptor deprecated

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

Deprecated: Use DataType.Descriptor instead.

func (DataType) Number

func (x DataType) Number() protoreflect.EnumNumber

func (DataType) String

func (x DataType) String() string

func (DataType) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) GetImpls

func (x *Function) GetImpls() []*Impl

func (*Function) GetName

func (x *Function) GetName() string

func (*Function) GetNeeds

func (x *Function) GetNeeds() DataType

func (*Function) GetPathFilters

func (x *Function) GetPathFilters() []string

func (*Function) GetProvides

func (x *Function) GetProvides() DataType

func (*Function) GetType

func (x *Function) GetType() Function_Type

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) ProtoReflect

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

func (*Function) Reset

func (x *Function) Reset()

func (*Function) String

func (x *Function) String() string

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) 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 (Function_Type) String

func (x Function_Type) String() string

func (Function_Type) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Impl.ProtoReflect.Descriptor instead.

func (*Impl) GetProvidesForPlatform

func (x *Impl) GetProvidesForPlatform() Platform

func (*Impl) GetRecipe

func (x *Impl) GetRecipe() *Recipe

func (*Impl) GetRuntimePlatform

func (x *Impl) GetRuntimePlatform() Platform

func (*Impl) ProtoMessage

func (*Impl) ProtoMessage()

func (*Impl) ProtoReflect

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

func (*Impl) Reset

func (x *Impl) Reset()

func (*Impl) String

func (x *Impl) String() string

type Platform

type Platform int32
const (
	Platform_UNSPECIFIED Platform = 0
	Platform_LINUX       Platform = 1
)

func (Platform) Descriptor

func (Platform) Descriptor() protoreflect.EnumDescriptor

func (Platform) Enum

func (x Platform) Enum() *Platform

func (Platform) EnumDescriptor deprecated

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

Deprecated: Use Platform.Descriptor instead.

func (Platform) Number

func (x Platform) Number() protoreflect.EnumNumber

func (Platform) String

func (x Platform) String() string

func (Platform) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Recipe.ProtoReflect.Descriptor instead.

func (*Recipe) GetBucket

func (x *Recipe) GetBucket() string

func (*Recipe) GetBuilder

func (x *Recipe) GetBuilder() string

func (*Recipe) GetProject

func (x *Recipe) GetProject() string

func (*Recipe) ProtoMessage

func (*Recipe) ProtoMessage()

func (*Recipe) ProtoReflect

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

func (*Recipe) Reset

func (x *Recipe) Reset()

func (*Recipe) String

func (x *Recipe) String() string

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 (*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) Descriptor() ([]byte, []int)

Deprecated: Use Selection.ProtoReflect.Descriptor instead.

func (*Selection) GetFunction

func (x *Selection) GetFunction() string

func (*Selection) GetPlatform

func (x *Selection) GetPlatform() Platform

func (*Selection) ProtoMessage

func (*Selection) ProtoMessage()

func (*Selection) ProtoReflect

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

func (*Selection) Reset

func (x *Selection) Reset()

func (*Selection) String

func (x *Selection) String() string

Jump to

Keyboard shortcuts

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