Documentation
¶
Index ¶
- Variables
- func SetTestConfig(ctx context.Context, cfg *Config) error
- func Update(c context.Context) error
- type BenignFilePattern
- type CleanCherryPickPattern
- func (*CleanCherryPickPattern) Descriptor() ([]byte, []int)deprecated
- func (x *CleanCherryPickPattern) GetExcludedPaths() []string
- func (x *CleanCherryPickPattern) GetTimeWindow() string
- func (*CleanCherryPickPattern) ProtoMessage()
- func (x *CleanCherryPickPattern) ProtoReflect() protoreflect.Message
- func (x *CleanCherryPickPattern) Reset()
- func (x *CleanCherryPickPattern) String() string
- type CleanRevertPattern
- func (*CleanRevertPattern) Descriptor() ([]byte, []int)deprecated
- func (x *CleanRevertPattern) GetExcludedPaths() []string
- func (x *CleanRevertPattern) GetTimeWindow() string
- func (*CleanRevertPattern) ProtoMessage()
- func (x *CleanRevertPattern) ProtoReflect() protoreflect.Message
- func (x *CleanRevertPattern) Reset()
- func (x *CleanRevertPattern) String() string
- type Config
- type HostConfig
- func (*HostConfig) Descriptor() ([]byte, []int)deprecated
- func (x *HostConfig) GetCleanCherryPickTimeWindow() string
- func (x *HostConfig) GetCleanRevertTimeWindow() string
- func (x *HostConfig) GetRepoConfigs() map[string]*RepoConfig
- func (*HostConfig) ProtoMessage()
- func (x *HostConfig) ProtoReflect() protoreflect.Message
- func (x *HostConfig) Reset()
- func (x *HostConfig) String() string
- type RepoConfig
- func (*RepoConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RepoConfig) GetBenignFilePattern() *BenignFilePattern
- func (x *RepoConfig) GetCleanCherryPickPattern() *CleanCherryPickPattern
- func (x *RepoConfig) GetCleanRevertPattern() *CleanRevertPattern
- func (*RepoConfig) ProtoMessage()
- func (x *RepoConfig) ProtoReflect() protoreflect.Message
- func (x *RepoConfig) Reset()
- func (x *RepoConfig) String() string
Constants ¶
This section is empty.
Variables ¶
var File_infra_appengine_rubber_stamper_config_config_proto protoreflect.FileDescriptor
Functions ¶
func SetTestConfig ¶
SetTestConfig set test configs in the cachedCfg.
Types ¶
type BenignFilePattern ¶
type BenignFilePattern struct {
// Paths contains the information that which files are allowed and which are
// not. The paths is parsed as lines in a .gitignore document, and therefore
// should follows rules listed in https://git-scm.com/docs/gitignore.
Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
// contains filtered or unexported fields
}
BenignFilePattern describes pattern of changes to benign files.
func (*BenignFilePattern) Descriptor
deprecated
func (*BenignFilePattern) Descriptor() ([]byte, []int)
Deprecated: Use BenignFilePattern.ProtoReflect.Descriptor instead.
func (*BenignFilePattern) GetPaths ¶
func (x *BenignFilePattern) GetPaths() []string
func (*BenignFilePattern) ProtoMessage ¶
func (*BenignFilePattern) ProtoMessage()
func (*BenignFilePattern) ProtoReflect ¶
func (x *BenignFilePattern) ProtoReflect() protoreflect.Message
func (*BenignFilePattern) Reset ¶
func (x *BenignFilePattern) Reset()
func (*BenignFilePattern) String ¶
func (x *BenignFilePattern) String() string
type CleanCherryPickPattern ¶
type CleanCherryPickPattern struct {
// The length of time in <int><unit> form. Has the same format as the
// `time_window` in CleanRevertPattern.
TimeWindow string `protobuf:"bytes,1,opt,name=time_window,json=timeWindow,proto3" json:"time_window,omitempty"`
// Paths that must have a human reviewer.
ExcludedPaths []string `protobuf:"bytes,2,rep,name=excluded_paths,json=excludedPaths,proto3" json:"excluded_paths,omitempty"`
// contains filtered or unexported fields
}
func (*CleanCherryPickPattern) Descriptor
deprecated
func (*CleanCherryPickPattern) Descriptor() ([]byte, []int)
Deprecated: Use CleanCherryPickPattern.ProtoReflect.Descriptor instead.
func (*CleanCherryPickPattern) GetExcludedPaths ¶
func (x *CleanCherryPickPattern) GetExcludedPaths() []string
func (*CleanCherryPickPattern) GetTimeWindow ¶
func (x *CleanCherryPickPattern) GetTimeWindow() string
func (*CleanCherryPickPattern) ProtoMessage ¶
func (*CleanCherryPickPattern) ProtoMessage()
func (*CleanCherryPickPattern) ProtoReflect ¶
func (x *CleanCherryPickPattern) ProtoReflect() protoreflect.Message
func (*CleanCherryPickPattern) Reset ¶
func (x *CleanCherryPickPattern) Reset()
func (*CleanCherryPickPattern) String ¶
func (x *CleanCherryPickPattern) String() string
type CleanRevertPattern ¶
type CleanRevertPattern struct {
// The length of time in <int><unit> form. Reverts need to be within this
// time_window to be valid.
// Valid units are "s", "m", "h", "d", meaning "seconds", "minutes",
// "hours", "days" respectively.
TimeWindow string `protobuf:"bytes,1,opt,name=time_window,json=timeWindow,proto3" json:"time_window,omitempty"`
// Paths that must have a human reviewer.
ExcludedPaths []string `protobuf:"bytes,2,rep,name=excluded_paths,json=excludedPaths,proto3" json:"excluded_paths,omitempty"`
// contains filtered or unexported fields
}
CleanRevertPattern describes pattern of clean reverts.
func (*CleanRevertPattern) Descriptor
deprecated
func (*CleanRevertPattern) Descriptor() ([]byte, []int)
Deprecated: Use CleanRevertPattern.ProtoReflect.Descriptor instead.
func (*CleanRevertPattern) GetExcludedPaths ¶
func (x *CleanRevertPattern) GetExcludedPaths() []string
func (*CleanRevertPattern) GetTimeWindow ¶
func (x *CleanRevertPattern) GetTimeWindow() string
func (*CleanRevertPattern) ProtoMessage ¶
func (*CleanRevertPattern) ProtoMessage()
func (*CleanRevertPattern) ProtoReflect ¶
func (x *CleanRevertPattern) ProtoReflect() protoreflect.Message
func (*CleanRevertPattern) Reset ¶
func (x *CleanRevertPattern) Reset()
func (*CleanRevertPattern) String ¶
func (x *CleanRevertPattern) String() string
type Config ¶
type Config struct {
// A map stores configs for all the Gerrit hosts, where keys are names of
// hosts (e.g. "chromium" or "chrome-internal"), values are corresponding
// configs.
HostConfigs map[string]*HostConfig `` /* 182-byte string literal not displayed */
// A global default time window for clean reverts and cherry picks. The
// format is the same as that of CleanRevertPattern.time_window.
DefaultTimeWindow string `protobuf:"bytes,2,opt,name=default_time_window,json=defaultTimeWindow,proto3" json:"default_time_window,omitempty"`
// contains filtered or unexported fields
}
Config is the service-wide configuration data for rubber-stamper.
func (*Config) Descriptor
deprecated
func (*Config) GetDefaultTimeWindow ¶
func (*Config) GetHostConfigs ¶
func (x *Config) GetHostConfigs() map[string]*HostConfig
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type HostConfig ¶
type HostConfig struct {
// A map stores config for repositories, where keys are names of repos (e.g.
// "chromium/src", "infra/infra") and values are corresponding configs.
RepoConfigs map[string]*RepoConfig `` /* 182-byte string literal not displayed */
// The default valid time window for clean reverts. This time window is
// applied at a host-level and the time window configured in repo-level
// configs will override this one. The format is the same as that of
// CleanRevertPattern.time_window.
CleanRevertTimeWindow string `` /* 128-byte string literal not displayed */
// The default valid time window for clean cherry-picks. This time window is
// applied at a host-level and the time window configured in repo-level
// configs will override this one. The format is the same as that of
// CleanCherryPickPattern.time_window.
CleanCherryPickTimeWindow string `` /* 142-byte string literal not displayed */
// contains filtered or unexported fields
}
HostConfig describes the config to be used for a Gerrit host.
func (*HostConfig) Descriptor
deprecated
func (*HostConfig) Descriptor() ([]byte, []int)
Deprecated: Use HostConfig.ProtoReflect.Descriptor instead.
func (*HostConfig) GetCleanCherryPickTimeWindow ¶
func (x *HostConfig) GetCleanCherryPickTimeWindow() string
func (*HostConfig) GetCleanRevertTimeWindow ¶
func (x *HostConfig) GetCleanRevertTimeWindow() string
func (*HostConfig) GetRepoConfigs ¶
func (x *HostConfig) GetRepoConfigs() map[string]*RepoConfig
func (*HostConfig) ProtoMessage ¶
func (*HostConfig) ProtoMessage()
func (*HostConfig) ProtoReflect ¶
func (x *HostConfig) ProtoReflect() protoreflect.Message
func (*HostConfig) Reset ¶
func (x *HostConfig) Reset()
func (*HostConfig) String ¶
func (x *HostConfig) String() string
type RepoConfig ¶
type RepoConfig struct {
BenignFilePattern *BenignFilePattern `protobuf:"bytes,1,opt,name=benign_file_pattern,json=benignFilePattern,proto3" json:"benign_file_pattern,omitempty"`
CleanRevertPattern *CleanRevertPattern `protobuf:"bytes,2,opt,name=clean_revert_pattern,json=cleanRevertPattern,proto3" json:"clean_revert_pattern,omitempty"`
CleanCherryPickPattern *CleanCherryPickPattern `` /* 131-byte string literal not displayed */
// contains filtered or unexported fields
}
RepoConfig describes the config to be used for a Gerrit repository.
func (*RepoConfig) Descriptor
deprecated
func (*RepoConfig) Descriptor() ([]byte, []int)
Deprecated: Use RepoConfig.ProtoReflect.Descriptor instead.
func (*RepoConfig) GetBenignFilePattern ¶
func (x *RepoConfig) GetBenignFilePattern() *BenignFilePattern
func (*RepoConfig) GetCleanCherryPickPattern ¶
func (x *RepoConfig) GetCleanCherryPickPattern() *CleanCherryPickPattern
func (*RepoConfig) GetCleanRevertPattern ¶
func (x *RepoConfig) GetCleanRevertPattern() *CleanRevertPattern
func (*RepoConfig) ProtoMessage ¶
func (*RepoConfig) ProtoMessage()
func (*RepoConfig) ProtoReflect ¶
func (x *RepoConfig) ProtoReflect() protoreflect.Message
func (*RepoConfig) Reset ¶
func (x *RepoConfig) Reset()
func (*RepoConfig) String ¶
func (x *RepoConfig) String() string