Documentation
¶
Index ¶
- Variables
- func New() (librepo.Configuration, config.CustomConfiguration)
- type CustomConfigImpl
- func (c *CustomConfigImpl) AlertTargetRegex() *regexp.Regexp
- func (c *CustomConfigImpl) AuthGroupWrite() string
- func (c *CustomConfigImpl) AuthOidcKeySetUrl() string
- func (c *CustomConfigImpl) AuthOidcTokenAudience() string
- func (c *CustomConfigImpl) BasicAuthPassword() string
- func (c *CustomConfigImpl) BasicAuthUsername() string
- func (c *CustomConfigImpl) BitbucketCacheRetentionSeconds() uint32
- func (c *CustomConfigImpl) BitbucketCacheSize() int
- func (c *CustomConfigImpl) BitbucketPassword() string
- func (c *CustomConfigImpl) BitbucketReviewerFallback() string
- func (c *CustomConfigImpl) BitbucketServer() string
- func (c *CustomConfigImpl) BitbucketUsername() string
- func (c *CustomConfigImpl) ElasticApmEnabled() bool
- func (c *CustomConfigImpl) GitCommitterEmail() string
- func (c *CustomConfigImpl) GitCommitterName() string
- func (c *CustomConfigImpl) Kafka() *kafka.Config
- func (c *CustomConfigImpl) KafkaGroupIdOverride() string
- func (c *CustomConfigImpl) MetadataRepoMainline() string
- func (c *CustomConfigImpl) MetadataRepoName() string
- func (c *CustomConfigImpl) MetadataRepoProject() string
- func (c *CustomConfigImpl) MetadataRepoUrl() string
- func (c *CustomConfigImpl) NotificationConsumerConfigs() map[string]config.NotificationConsumerConfig
- func (c *CustomConfigImpl) Obtain(getter func(key string) string)
- func (c *CustomConfigImpl) OwnerAliasMaxLength() uint16
- func (c *CustomConfigImpl) OwnerAliasPermittedRegex() *regexp.Regexp
- func (c *CustomConfigImpl) OwnerAliasProhibitedRegex() *regexp.Regexp
- func (c *CustomConfigImpl) OwnerFilterAliasRegex() *regexp.Regexp
- func (c *CustomConfigImpl) PullRequestBuildKey() string
- func (c *CustomConfigImpl) PullRequestBuildUrl() string
- func (c *CustomConfigImpl) RedisPassword() string
- func (c *CustomConfigImpl) RedisUrl() string
- func (c *CustomConfigImpl) RepositoryKeySeparator() string
- func (c *CustomConfigImpl) RepositoryNameMaxLength() uint16
- func (c *CustomConfigImpl) RepositoryNamePermittedRegex() *regexp.Regexp
- func (c *CustomConfigImpl) RepositoryNameProhibitedRegex() *regexp.Regexp
- func (c *CustomConfigImpl) RepositoryTypes() []string
- func (c *CustomConfigImpl) SSHMetadataRepositoryUrl() string
- func (c *CustomConfigImpl) SSHPrivateKey() string
- func (c *CustomConfigImpl) SSHPrivateKeyPassword() string
- func (c *CustomConfigImpl) ServiceNameMaxLength() uint16
- func (c *CustomConfigImpl) ServiceNamePermittedRegex() *regexp.Regexp
- func (c *CustomConfigImpl) ServiceNameProhibitedRegex() *regexp.Regexp
- func (c *CustomConfigImpl) UpdateJobIntervalCronPart() string
- func (c *CustomConfigImpl) UpdateJobTimeoutSeconds() uint16
- func (c *CustomConfigImpl) UserPrefix() string
- func (c *CustomConfigImpl) VCSConfigs() map[string]config.VCSConfig
- func (c *CustomConfigImpl) WebhooksProcessAsync() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var CustomConfigItems = []auconfigapi.ConfigItem{ { Key: config.KeyBasicAuthUsername, EnvName: config.KeyBasicAuthUsername, Default: "", Description: "username for basic-auth write access to this service", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyBasicAuthPassword, EnvName: config.KeyBasicAuthPassword, Default: "", Description: "password for basic-auth write access to this service", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeySSHPrivateKey, EnvName: config.KeySSHPrivateKey, Description: "ssh private key used to access the vcs", Default: "", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeySSHPrivateKeyPassword, EnvName: config.KeySSHPrivateKeyPassword, Description: "ssh private key password", Default: "", Validate: auconfigapi.ConfigNeedsNoValidation, }, { Key: config.KeySSHMetadataRepositoryUrl, EnvName: config.KeySSHMetadataRepositoryUrl, Default: "", Description: "ssh git clone url for service-metadata repository", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyBitbucketUsername, EnvName: config.KeyBitbucketUsername, Default: "", Description: "bitbucket username for api and git clone service-metadata access", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyBitbucketPassword, EnvName: config.KeyBitbucketPassword, Default: "", Description: "bitbucket password for api and git clone service-metadata access", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyBitbucketServer, EnvName: config.KeyBitbucketServer, Default: "https://bitbucket.com", Description: "base URL to the bitbucket server, including protocol", Validate: auconfigenv.ObtainPatternValidator("^https?://.*$"), }, { Key: config.KeyBitbucketCacheSize, EnvName: config.KeyBitbucketCacheSize, Default: "1000", Description: "size of the cache for bitbucket api items", Validate: auconfigenv.ObtainUintRangeValidator(10, 1000), }, { Key: config.KeyBitbucketCacheRetentionSeconds, EnvName: config.KeyBitbucketCacheRetentionSeconds, Default: "3600", Description: "seconds to keep items in the bitbucket api cache (only used for bitbucket users)", Validate: auconfigenv.ObtainUintRangeValidator(60, math.MaxUint32), }, { Key: config.KeyBitbucketReviewerFallback, EnvName: config.KeyBitbucketReviewerFallback, Default: "", Description: "default fallback reviewer username or groupname", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyGitCommitterName, EnvName: config.KeyGitCommitterName, Default: "", Description: "name to use for git commits", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyGitCommitterEmail, EnvName: config.KeyGitCommitterEmail, Default: "", Description: "email address to use for git commits", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyKafkaGroupIdOverride, EnvName: config.KeyKafkaGroupIdOverride, Default: "", Description: "optional: a kafka group id to use for subscribing to update events. Mainly useful on localhost. If empty, group id is derived from 3rd oktet of non-trivial local ip (as proxy for the k8s worker node)", Validate: auconfigenv.ObtainPatternValidator("^(|[a-z0-9-]+)$"), }, { Key: config.KeyAuthOidcKeySetUrl, EnvName: config.KeyAuthOidcKeySetUrl, Default: "", Description: "keyset url of oidc identity provider", Validate: auconfigenv.ObtainPatternValidator("^https?:.*$"), }, { Key: config.KeyAuthOidcTokenAudience, EnvName: config.KeyAuthOidcTokenAudience, Default: "", Description: "expected audience of oidc access token", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyAuthGroupWrite, EnvName: config.KeyAuthGroupWrite, Default: "", Description: "group name or id for write access to this service", Validate: auconfigapi.ConfigNeedsNoValidation, }, { Key: config.KeyMetadataRepoUrl, EnvName: config.KeyMetadataRepoUrl, Default: "", Description: "git clone url for service-metadata repository", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyMetadataRepoMainline, EnvName: config.KeyMetadataRepoMainline, Default: "refs/heads/main", Description: "ref to use as mainline", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyUpdateJobIntervalMinutes, EnvName: config.KeyUpdateJobIntervalMinutes, Default: "5", Description: "time in minutes between cache update. Must be a divisor of 60 (used in cron expression) - pick one of the choices", Validate: auconfigenv.ObtainPatternValidator("^(1|2|3|4|5|6|10|12|15|20|30)$"), }, { Key: config.KeyUpdateJobTimeoutSeconds, EnvName: config.KeyUpdateJobTimeoutSeconds, Default: "30", Description: "timeout for the cache update job in seconds. Must be less than 60 * UPDATE_JOB_INTERVAL_MINUTES", Validate: auconfigenv.ObtainUintRangeValidator(10, 60), }, { Key: config.KeyAlertTargetRegex, EnvName: config.KeyAlertTargetRegex, Default: "", Validate: auconfigenv.ObtainIsRegexValidator(), }, { Key: config.KeyElasticApmDisabled, EnvName: config.KeyElasticApmDisabled, Default: "false", Description: "disable elastic apm middleware. supports all values supported by ParseBool (https://pkg.go.dev/strconv#ParseBool).", Validate: auconfigenv.ObtainIsBooleanValidator(), }, { Key: config.KeyOwnerAliasPermittedRegex, EnvName: config.KeyOwnerAliasPermittedRegex, Default: "^[a-z](-?[a-z0-9]+)*$", Description: "regular expression to control the owner aliases that are permitted to be be created.", Validate: auconfigenv.ObtainIsRegexValidator(), }, { Key: config.KeyOwnerAliasProhibitedRegex, EnvName: config.KeyOwnerAliasProhibitedRegex, Default: "^$", Description: "regular expression to control the owner aliases that are prohibited to be be created.", Validate: auconfigenv.ObtainIsRegexValidator(), }, { Key: config.KeyOwnerAliasFilterRegex, EnvName: config.KeyOwnerAliasFilterRegex, Default: "^.*$", Description: "regular expression to filter owners based on their alias. Useful on localhost or for test instances to speed up service startup.", Validate: auconfigenv.ObtainIsRegexValidator(), }, { Key: config.KeyOwnerAliasMaxLength, EnvName: config.KeyOwnerAliasMaxLength, Default: "28", Description: "maximum length of a valid owner alias.", Validate: auconfigenv.ObtainIntRangeValidator(1, 100), }, { Key: config.KeyServiceNamePermittedRegex, EnvName: config.KeyServiceNamePermittedRegex, Default: "^[a-z](-?[a-z0-9]+)*$", Description: "regular expression to control the service names that are permitted to be be created.", Validate: auconfigenv.ObtainIsRegexValidator(), }, { Key: config.KeyServiceNameProhibitedRegex, EnvName: config.KeyServiceNameProhibitedRegex, Default: "^$", Description: "regular expression to control the service names that are prohibited to be be created.", Validate: auconfigenv.ObtainIsRegexValidator(), }, { Key: config.KeyServiceNameMaxLength, EnvName: config.KeyServiceNameMaxLength, Default: "28", Description: "maximum length of a valid service name.", Validate: auconfigenv.ObtainIntRangeValidator(1, 100), }, { Key: config.KeyRepositoryNamePermittedRegex, EnvName: config.KeyRepositoryNamePermittedRegex, Default: "^[a-z](-?[a-z0-9]+)*$", Description: "regular expression to control the repository names that are permitted to be be created.", Validate: auconfigenv.ObtainIsRegexValidator(), }, { Key: config.KeyRepositoryNameProhibitedRegex, EnvName: config.KeyRepositoryNameProhibitedRegex, Default: "^$", Description: "regular expression to control the repository names that are prohibited to be be created.", Validate: auconfigenv.ObtainIsRegexValidator(), }, { Key: config.KeyRepositoryNameMaxLength, EnvName: config.KeyRepositoryNameMaxLength, Default: "64", Description: "maximum length of a valid repository name.", Validate: auconfigenv.ObtainIntRangeValidator(1, 100), }, { Key: config.KeyRepositoryTypes, EnvName: config.KeyRepositoryTypes, Default: "", Description: "comma separated list of supported repository types.", Validate: auconfigenv.ObtainPatternValidator("^|[a-z](-?[a-z0-9]+)*(,[a-z](-?[a-z0-9]+)*)*$"), }, { Key: config.KeyRepositoryKeySeparator, EnvName: config.KeyRepositoryKeySeparator, Default: ".", Description: "single character used to separate repository name from repository type. repository name and repository type must not contain separator.", Validate: auconfigenv.ObtainSingleCharacterValidator(), }, { Key: config.KeyNotificationConsumerConfigs, EnvName: config.KeyNotificationConsumerConfigs, Default: "", Description: "configurations for consumers of change notifications.", Validate: func(key string) error { value := auconfigenv.Get(key) _, err := parseNotificationConsumerConfigs(value) return err }, }, { Key: config.KeyRedisUrl, EnvName: config.KeyRedisUrl, Default: "", Description: "base url to the redis, including protocol. Uses in-memory caching if blank.", Validate: auconfigapi.ConfigNeedsNoValidation, }, { Key: config.KeyRedisPassword, EnvName: config.KeyRedisPassword, Default: "", Description: "password used to access the redis", Validate: auconfigapi.ConfigNeedsNoValidation, }, { Key: config.KeyPullRequestBuildUrl, EnvName: config.KeyPullRequestBuildUrl, Default: "", Description: "Url that pull request builds should link to.", Validate: auconfigenv.ObtainPatternValidator("^https?://.*$"), }, { Key: config.KeyPullRequestBuildKey, EnvName: config.KeyPullRequestBuildKey, Default: "metadata-service", Description: "Key to use for pull request builds.", Validate: auconfigapi.ConfigNeedsNoValidation, }, { Key: config.KeyVCSConfigs, EnvName: config.KeyVCSConfigs, Description: "Version control system configuration settings", Default: "{}", Validate: auconfigenv.ObtainNotEmptyValidator(), }, { Key: config.KeyWebhooksProcessAsync, EnvName: config.KeyWebhooksProcessAsync, Description: "Webhooks handling async", Default: "true", Validate: auconfigapi.ConfigNeedsNoValidation, }, { Key: config.KeyUserPrefix, EnvName: config.KeyUserPrefix, Description: "User prefix", Default: "", Validate: auconfigapi.ConfigNeedsNoValidation, }, }
Functions ¶
func New ¶
func New() (librepo.Configuration, config.CustomConfiguration)
Types ¶
type CustomConfigImpl ¶
type CustomConfigImpl struct { VBasicAuthUsername string VBasicAuthPassword string VSSHPrivateKey string VSSHPrivateKeyPassword string VSSHMetadataRepoUrl string VBitbucketUsername string VBitbucketPassword string VBitbucketServer string VBitbucketCacheSize int VBitbucketCacheRetentionSeconds uint32 VBitbucketReviewerFallback string VGitCommitterName string VGitCommitterEmail string VAuthOidcKeySetUrl string VAuthOidcTokenAudience string VAuthGroupWrite string VKafkaGroupIdOverride string VMetadataRepoUrl string VMetadataRepoMainline string VUpdateJobIntervalCronPart string VUpdateJobTimeoutSeconds uint16 VAlertTargetRegex *regexp.Regexp VElasticApmDisabled bool VOwnerAliasPermittedRegex *regexp.Regexp VOwnerAliasProhibitedRegex *regexp.Regexp VOwnerAliasMaxLength uint16 VOwnerAliasFilterRegex *regexp.Regexp VServiceNamePermittedRegex *regexp.Regexp VServiceNameProhibitedRegex *regexp.Regexp VServiceNameMaxLength uint16 VRepositoryNamePermittedRegex *regexp.Regexp VRepositoryNameProhibitedRegex *regexp.Regexp VRepositoryNameMaxLength uint16 VRepositoryTypes string VRepositoryKeySeparator string VNotificationConsumerConfigs map[string]config.NotificationConsumerConfig VRedisUrl string VRedisPassword string VPullRequestBuildUrl string VPullRequestBuildKey string VVCSConfig map[string]config.VCSConfig VWebhooksProcessAsync bool VUserPrefix string VKafkaConfig *kafka.Config GitUrlMatcher *regexp.Regexp }
func (*CustomConfigImpl) AlertTargetRegex ¶ added in v0.38.4
func (c *CustomConfigImpl) AlertTargetRegex() *regexp.Regexp
func (*CustomConfigImpl) AuthGroupWrite ¶ added in v0.13.0
func (c *CustomConfigImpl) AuthGroupWrite() string
func (*CustomConfigImpl) AuthOidcKeySetUrl ¶ added in v0.13.0
func (c *CustomConfigImpl) AuthOidcKeySetUrl() string
func (*CustomConfigImpl) AuthOidcTokenAudience ¶ added in v0.13.0
func (c *CustomConfigImpl) AuthOidcTokenAudience() string
func (*CustomConfigImpl) BasicAuthPassword ¶ added in v0.12.0
func (c *CustomConfigImpl) BasicAuthPassword() string
func (*CustomConfigImpl) BasicAuthUsername ¶ added in v0.12.0
func (c *CustomConfigImpl) BasicAuthUsername() string
func (*CustomConfigImpl) BitbucketCacheRetentionSeconds ¶ added in v0.16.0
func (c *CustomConfigImpl) BitbucketCacheRetentionSeconds() uint32
func (*CustomConfigImpl) BitbucketCacheSize ¶ added in v0.16.0
func (c *CustomConfigImpl) BitbucketCacheSize() int
func (*CustomConfigImpl) BitbucketPassword ¶ added in v0.12.0
func (c *CustomConfigImpl) BitbucketPassword() string
func (*CustomConfigImpl) BitbucketReviewerFallback ¶ added in v0.16.0
func (c *CustomConfigImpl) BitbucketReviewerFallback() string
func (*CustomConfigImpl) BitbucketServer ¶ added in v0.16.0
func (c *CustomConfigImpl) BitbucketServer() string
func (*CustomConfigImpl) BitbucketUsername ¶ added in v0.12.0
func (c *CustomConfigImpl) BitbucketUsername() string
func (*CustomConfigImpl) ElasticApmEnabled ¶ added in v0.5.0
func (c *CustomConfigImpl) ElasticApmEnabled() bool
func (*CustomConfigImpl) GitCommitterEmail ¶
func (c *CustomConfigImpl) GitCommitterEmail() string
func (*CustomConfigImpl) GitCommitterName ¶
func (c *CustomConfigImpl) GitCommitterName() string
func (*CustomConfigImpl) Kafka ¶ added in v0.36.0
func (c *CustomConfigImpl) Kafka() *kafka.Config
func (*CustomConfigImpl) KafkaGroupIdOverride ¶
func (c *CustomConfigImpl) KafkaGroupIdOverride() string
func (*CustomConfigImpl) MetadataRepoMainline ¶ added in v0.20.0
func (c *CustomConfigImpl) MetadataRepoMainline() string
func (*CustomConfigImpl) MetadataRepoName ¶ added in v0.38.0
func (c *CustomConfigImpl) MetadataRepoName() string
func (*CustomConfigImpl) MetadataRepoProject ¶ added in v0.38.0
func (c *CustomConfigImpl) MetadataRepoProject() string
func (*CustomConfigImpl) MetadataRepoUrl ¶
func (c *CustomConfigImpl) MetadataRepoUrl() string
func (*CustomConfigImpl) NotificationConsumerConfigs ¶ added in v0.32.0
func (c *CustomConfigImpl) NotificationConsumerConfigs() map[string]config.NotificationConsumerConfig
func (*CustomConfigImpl) Obtain ¶
func (c *CustomConfigImpl) Obtain(getter func(key string) string)
func (*CustomConfigImpl) OwnerAliasMaxLength ¶ added in v0.9.0
func (c *CustomConfigImpl) OwnerAliasMaxLength() uint16
func (*CustomConfigImpl) OwnerAliasPermittedRegex ¶ added in v0.9.0
func (c *CustomConfigImpl) OwnerAliasPermittedRegex() *regexp.Regexp
func (*CustomConfigImpl) OwnerAliasProhibitedRegex ¶ added in v0.9.0
func (c *CustomConfigImpl) OwnerAliasProhibitedRegex() *regexp.Regexp
func (*CustomConfigImpl) OwnerFilterAliasRegex ¶ added in v0.9.0
func (c *CustomConfigImpl) OwnerFilterAliasRegex() *regexp.Regexp
func (*CustomConfigImpl) PullRequestBuildKey ¶ added in v0.38.0
func (c *CustomConfigImpl) PullRequestBuildKey() string
func (*CustomConfigImpl) PullRequestBuildUrl ¶ added in v0.38.0
func (c *CustomConfigImpl) PullRequestBuildUrl() string
func (*CustomConfigImpl) RedisPassword ¶ added in v0.36.0
func (c *CustomConfigImpl) RedisPassword() string
func (*CustomConfigImpl) RedisUrl ¶ added in v0.36.0
func (c *CustomConfigImpl) RedisUrl() string
func (*CustomConfigImpl) RepositoryKeySeparator ¶ added in v0.9.0
func (c *CustomConfigImpl) RepositoryKeySeparator() string
func (*CustomConfigImpl) RepositoryNameMaxLength ¶ added in v0.9.0
func (c *CustomConfigImpl) RepositoryNameMaxLength() uint16
func (*CustomConfigImpl) RepositoryNamePermittedRegex ¶ added in v0.9.0
func (c *CustomConfigImpl) RepositoryNamePermittedRegex() *regexp.Regexp
func (*CustomConfigImpl) RepositoryNameProhibitedRegex ¶ added in v0.9.0
func (c *CustomConfigImpl) RepositoryNameProhibitedRegex() *regexp.Regexp
func (*CustomConfigImpl) RepositoryTypes ¶ added in v0.9.0
func (c *CustomConfigImpl) RepositoryTypes() []string
func (*CustomConfigImpl) SSHMetadataRepositoryUrl ¶ added in v0.23.0
func (c *CustomConfigImpl) SSHMetadataRepositoryUrl() string
func (*CustomConfigImpl) SSHPrivateKey ¶ added in v0.23.0
func (c *CustomConfigImpl) SSHPrivateKey() string
func (*CustomConfigImpl) SSHPrivateKeyPassword ¶ added in v0.23.0
func (c *CustomConfigImpl) SSHPrivateKeyPassword() string
func (*CustomConfigImpl) ServiceNameMaxLength ¶ added in v0.9.0
func (c *CustomConfigImpl) ServiceNameMaxLength() uint16
func (*CustomConfigImpl) ServiceNamePermittedRegex ¶ added in v0.9.0
func (c *CustomConfigImpl) ServiceNamePermittedRegex() *regexp.Regexp
func (*CustomConfigImpl) ServiceNameProhibitedRegex ¶ added in v0.9.0
func (c *CustomConfigImpl) ServiceNameProhibitedRegex() *regexp.Regexp
func (*CustomConfigImpl) UpdateJobIntervalCronPart ¶
func (c *CustomConfigImpl) UpdateJobIntervalCronPart() string
func (*CustomConfigImpl) UpdateJobTimeoutSeconds ¶
func (c *CustomConfigImpl) UpdateJobTimeoutSeconds() uint16
func (*CustomConfigImpl) UserPrefix ¶ added in v0.39.0
func (c *CustomConfigImpl) UserPrefix() string
func (*CustomConfigImpl) VCSConfigs ¶ added in v0.39.0
func (c *CustomConfigImpl) VCSConfigs() map[string]config.VCSConfig
func (*CustomConfigImpl) WebhooksProcessAsync ¶ added in v0.39.0
func (c *CustomConfigImpl) WebhooksProcessAsync() bool
Click to show internal directories.
Click to hide internal directories.