Documentation ¶
Overview ¶
Package config implements interface for app-level configs for Arquebus.
Index ¶
- Variables
- func GetConfigRevision(c context.Context) string
- func Middleware(c *router.Context, next router.Handler)
- func SetConfig(c context.Context, cfg *Config, rev string) context.Context
- func Update(c context.Context) error
- type Assigner
- func (*Assigner) Descriptor() ([]byte, []int)deprecated
- func (x *Assigner) GetAssignees() []*UserSource
- func (x *Assigner) GetCcs() []*UserSource
- func (x *Assigner) GetComment() string
- func (x *Assigner) GetDescription() string
- func (x *Assigner) GetDryRun() bool
- func (x *Assigner) GetId() string
- func (x *Assigner) GetInterval() *durationpb.Duration
- func (x *Assigner) GetIssueQuery() *IssueQuery
- func (x *Assigner) GetOwners() []string
- func (*Assigner) ProtoMessage()
- func (x *Assigner) ProtoReflect() protoreflect.Message
- func (x *Assigner) Reset()
- func (x *Assigner) String() string
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetAccessGroup() string
- func (x *Config) GetAssigners() []*Assigner
- func (x *Config) GetMonorailHostname() string
- func (x *Config) GetRotationProxyHostname() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type IssueQuery
- func (*IssueQuery) Descriptor() ([]byte, []int)deprecated
- func (x *IssueQuery) GetProjectNames() []string
- func (x *IssueQuery) GetQ() string
- func (lhs *IssueQuery) IsEqual(rhs *IssueQuery) bool
- func (*IssueQuery) ProtoMessage()
- func (x *IssueQuery) ProtoReflect() protoreflect.Message
- func (x *IssueQuery) Reset()
- func (x *IssueQuery) String() string
- type Oncall
- func (*Oncall) Descriptor() ([]byte, []int)deprecated
- func (x *Oncall) GetName() string
- func (x *Oncall) GetPosition() Oncall_Position
- func (x *Oncall) GetRotation() string
- func (*Oncall) ProtoMessage()
- func (x *Oncall) ProtoReflect() protoreflect.Message
- func (x *Oncall) Reset()
- func (x *Oncall) String() string
- type Oncall_Position
- func (Oncall_Position) Descriptor() protoreflect.EnumDescriptor
- func (x Oncall_Position) Enum() *Oncall_Position
- func (Oncall_Position) EnumDescriptor() ([]byte, []int)deprecated
- func (x Oncall_Position) Number() protoreflect.EnumNumber
- func (x Oncall_Position) String() string
- func (Oncall_Position) Type() protoreflect.EnumType
- type UserSource
- func (*UserSource) Descriptor() ([]byte, []int)deprecated
- func (x *UserSource) GetEmail() string
- func (m *UserSource) GetFrom() isUserSource_From
- func (x *UserSource) GetRotation() *Oncall
- func (*UserSource) ProtoMessage()
- func (x *UserSource) ProtoReflect() protoreflect.Message
- func (x *UserSource) Reset()
- func (x *UserSource) String() string
- type UserSource_Email
- type UserSource_Rotation
Constants ¶
This section is empty.
Variables ¶
var ( Oncall_Position_name = map[int32]string{ 0: "UNSET", 1: "PRIMARY", 2: "SECONDARY", } Oncall_Position_value = map[string]int32{ "UNSET": 0, "PRIMARY": 1, "SECONDARY": 2, } )
Enum value maps for Oncall_Position.
var File_infra_appengine_arquebus_app_config_config_proto protoreflect.FileDescriptor
Functions ¶
func GetConfigRevision ¶
GetConfigRevision returns the revision of the current config.
func Middleware ¶
Middleware loads the service config and installs it into the context.
Types ¶
type Assigner ¶
type Assigner struct { // The unique ID of the Assigner. // // This value will be used in URLs of UI, so keep it short. Note that // only lowercase alphabet letters and numbers are allowed. A hyphen may // be placed between letters and numbers. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // An email list of the owners of the Assigner. Owners []string `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners,omitempty"` // The duration between the start of an Assigner run and the next one. // // This value should be at least a minute long. Interval *durationpb.Duration `protobuf:"bytes,3,opt,name=interval,proto3" json:"interval,omitempty"` // IssueQuery describes the search criteria to look for issues to assign. IssueQuery *IssueQuery `protobuf:"bytes,4,opt,name=issue_query,json=issueQuery,proto3" json:"issue_query,omitempty"` // If multiple values are specified in assignees, Arquebus iterates the list // in the order until it finds a currently available assignee. Note that // Monorail users are always assumed to be available. Assignees []*UserSource `protobuf:"bytes,6,rep,name=assignees,proto3" json:"assignees,omitempty"` // If multiple values are specified in ccs, all the available roations and // users are added to the CC of searched issues. Ccs []*UserSource `protobuf:"bytes,7,rep,name=ccs,proto3" json:"ccs,omitempty"` // If DryRun is set, Assigner doesn't update the found issues. DryRun bool `protobuf:"varint,8,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // The description shown on UI. Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` // Comment is an additional message that is added to the body of the issue // comment that is posted when an issue gets updated. Comment string `protobuf:"bytes,10,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
Assigner contains specifications for an Assigner job.
func (*Assigner) Descriptor
deprecated
func (*Assigner) GetAssignees ¶
func (x *Assigner) GetAssignees() []*UserSource
func (*Assigner) GetCcs ¶
func (x *Assigner) GetCcs() []*UserSource
func (*Assigner) GetComment ¶
func (*Assigner) GetDescription ¶
func (*Assigner) GetInterval ¶
func (x *Assigner) GetInterval() *durationpb.Duration
func (*Assigner) GetIssueQuery ¶
func (x *Assigner) GetIssueQuery() *IssueQuery
func (*Assigner) ProtoMessage ¶
func (*Assigner) ProtoMessage()
func (*Assigner) ProtoReflect ¶
func (x *Assigner) ProtoReflect() protoreflect.Message
type Config ¶
type Config struct { // AccessGroup is the luci-auth group who has access to admin pages and // APIs. AccessGroup string `protobuf:"bytes,1,opt,name=access_group,json=accessGroup,proto3" json:"access_group,omitempty"` // The endpoint for Monorail APIs. MonorailHostname string `protobuf:"bytes,2,opt,name=monorail_hostname,json=monorailHostname,proto3" json:"monorail_hostname,omitempty"` // A list of Assigner config(s). Assigners []*Assigner `protobuf:"bytes,3,rep,name=assigners,proto3" json:"assigners,omitempty"` // The endpoint for Rotation Proxy APIs. RotationProxyHostname string `` /* 126-byte string literal not displayed */ // contains filtered or unexported fields }
Config is the service-wide configuration data for Arquebus
func (*Config) Descriptor
deprecated
func (*Config) GetAccessGroup ¶
func (*Config) GetAssigners ¶
func (*Config) GetMonorailHostname ¶
func (*Config) GetRotationProxyHostname ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type IssueQuery ¶
type IssueQuery struct { // Free-form text query. Q string `protobuf:"bytes,1,opt,name=q,proto3" json:"q,omitempty"` // String name of the projects to search issues for, e.g. "chromium". ProjectNames []string `protobuf:"bytes,2,rep,name=project_names,json=projectNames,proto3" json:"project_names,omitempty"` // contains filtered or unexported fields }
IssueQuery describes the issue query to be used for searching unassigned issues in Monorail.
func (*IssueQuery) Descriptor
deprecated
func (*IssueQuery) Descriptor() ([]byte, []int)
Deprecated: Use IssueQuery.ProtoReflect.Descriptor instead.
func (*IssueQuery) GetProjectNames ¶
func (x *IssueQuery) GetProjectNames() []string
func (*IssueQuery) GetQ ¶
func (x *IssueQuery) GetQ() string
func (*IssueQuery) IsEqual ¶
func (lhs *IssueQuery) IsEqual(rhs *IssueQuery) bool
IsEqual returns whether the IssueQuery objects are equal.
func (*IssueQuery) ProtoMessage ¶
func (*IssueQuery) ProtoMessage()
func (*IssueQuery) ProtoReflect ¶
func (x *IssueQuery) ProtoReflect() protoreflect.Message
func (*IssueQuery) Reset ¶
func (x *IssueQuery) Reset()
func (*IssueQuery) String ¶
func (x *IssueQuery) String() string
type Oncall ¶
type Oncall struct { // Deprecated: Use Rotation.name instead. Rotation string `protobuf:"bytes,1,opt,name=rotation,proto3" json:"rotation,omitempty"` // The oncall position in the shift. Position Oncall_Position `protobuf:"varint,2,opt,name=position,proto3,enum=arquebus.config.Oncall_Position" json:"position,omitempty"` // The name of the rotation. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Oncall represents a rotation shift modelled in Rotation Proxy. Next ID: 4
func (*Oncall) Descriptor
deprecated
func (*Oncall) GetPosition ¶
func (x *Oncall) GetPosition() Oncall_Position
func (*Oncall) GetRotation ¶
func (*Oncall) ProtoMessage ¶
func (*Oncall) ProtoMessage()
func (*Oncall) ProtoReflect ¶
func (x *Oncall) ProtoReflect() protoreflect.Message
type Oncall_Position ¶
type Oncall_Position int32
const ( Oncall_UNSET Oncall_Position = 0 Oncall_PRIMARY Oncall_Position = 1 Oncall_SECONDARY Oncall_Position = 2 )
func (Oncall_Position) Descriptor ¶
func (Oncall_Position) Descriptor() protoreflect.EnumDescriptor
func (Oncall_Position) Enum ¶
func (x Oncall_Position) Enum() *Oncall_Position
func (Oncall_Position) EnumDescriptor
deprecated
func (Oncall_Position) EnumDescriptor() ([]byte, []int)
Deprecated: Use Oncall_Position.Descriptor instead.
func (Oncall_Position) Number ¶
func (x Oncall_Position) Number() protoreflect.EnumNumber
func (Oncall_Position) String ¶
func (x Oncall_Position) String() string
func (Oncall_Position) Type ¶
func (Oncall_Position) Type() protoreflect.EnumType
type UserSource ¶
type UserSource struct { // Types that are assignable to From: // *UserSource_Email // *UserSource_Rotation From isUserSource_From `protobuf_oneof:"from"` // contains filtered or unexported fields }
UserSource represents a single source to find a valid Monorail user to whom Arquebus will assign or cc issues found.
func (*UserSource) Descriptor
deprecated
func (*UserSource) Descriptor() ([]byte, []int)
Deprecated: Use UserSource.ProtoReflect.Descriptor instead.
func (*UserSource) GetEmail ¶
func (x *UserSource) GetEmail() string
func (*UserSource) GetFrom ¶
func (m *UserSource) GetFrom() isUserSource_From
func (*UserSource) GetRotation ¶
func (x *UserSource) GetRotation() *Oncall
func (*UserSource) ProtoMessage ¶
func (*UserSource) ProtoMessage()
func (*UserSource) ProtoReflect ¶
func (x *UserSource) ProtoReflect() protoreflect.Message
func (*UserSource) Reset ¶
func (x *UserSource) Reset()
func (*UserSource) String ¶
func (x *UserSource) String() string
type UserSource_Email ¶
type UserSource_Email struct { // The email address of a Monorail user account. Email string `protobuf:"bytes,2,opt,name=email,proto3,oneof"` // e.g., user@chromium.org }
type UserSource_Rotation ¶
type UserSource_Rotation struct { // Represents a rotation shift modelled in rotation-proxy. Rotation *Oncall `protobuf:"bytes,3,opt,name=rotation,proto3,oneof"` }