conf

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvatarStorageURL

func AvatarStorageURL() string

AvatarStorageURL 返回 OSSUsage 选项

func Base64EncodedRsaPrivateKey

func Base64EncodedRsaPrivateKey() string

Base64EncodedRsaPrivateKey 返回 rsa 私钥

func Base64EncodedRsaPublicKey

func Base64EncodedRsaPublicKey() string

Base64EncodedRsaPublicKey 返回 rsa 公钥

func BundleTimeoutSecond

func BundleTimeoutSecond() int

func CMDBAddr

func CMDBAddr() string

func CentralNexusAddr

func CentralNexusAddr() string

CentralNexusAddr 返回 中心集群 nexus 地址

func CentralNexusComponentName

func CentralNexusComponentName() string

CentralNexusComponentName 返回 中心集群 nexus 组件名

func CentralNexusPassword

func CentralNexusPassword() string

CentralNexusPassword 返回 中心集群 nexus 密码

func CentralNexusPublicURL

func CentralNexusPublicURL() string

CentralNexusPublicURL 返回 中心集群 nexus 公网地址

func CentralNexusUsername

func CentralNexusUsername() string

CentralNexusUsername 返回 中心集群 nexus 用户名

func ConsumerNum

func ConsumerNum() int

func Debug

func Debug() bool

func DiceClusterName

func DiceClusterName() string

func EventboxAddr

func EventboxAddr() string

func ExportIssueFileStoreDay

func ExportIssueFileStoreDay() int

func GittarAddr

func GittarAddr() string

func GittarPublicURL

func GittarPublicURL() string

func GolangCILintImage

func GolangCILintImage() string

func Load

func Load()

Load loads envs

func MaxIssueFilterBm

func MaxIssueFilterBm() int

MaxIssueFilterBm returns maximum limitation of IssueFilterBookmarks

func MetricsIssueCron

func MetricsIssueCron() string

func MonitorAddr

func MonitorAddr() string

func NexusAddr

func NexusAddr() string

func NexusPassword

func NexusPassword() string

func NexusUsername

func NexusUsername() string

func OryCompatibleClientID

func OryCompatibleClientID() string

func OryCompatibleClientSecret

func OryCompatibleClientSecret() string

func OryEnabled

func OryEnabled() bool

func OryKratosPrivateAddr

func OryKratosPrivateAddr() string

func PipelineGrpcClientMaxCallSendSizeBytes

func PipelineGrpcClientMaxCallSendSizeBytes() int

PipelineGrpcClientMaxCallSendSizeBytes The maximum amount of data that the grpc client can send to the pipeline server see https://stackoverflow.com/questions/55362342/grpc-received-message-larger-than-max-8653851-vs-4194304

func ProjectStatsCacheCron

func ProjectStatsCacheCron() string

ProjectStatsCacheCron 项目状态缓存刷新周期

func SonarAddr

func SonarAddr() string

func SonarAdminToken

func SonarAdminToken() string

func SonarPublicURL

func SonarPublicURL() string

func SuperUserID

func SuperUserID() string

func TestFileIntervalSec

func TestFileIntervalSec() int

func TestFileRecordPurgeCycleDay

func TestFileRecordPurgeCycleDay() int

func TestFileRecordTimeout

func TestFileRecordTimeout() time.Duration

func TestSetSyncCopyMaxNum

func TestSetSyncCopyMaxNum() int

func UCClientID

func UCClientID() string

func UCClientSecret

func UCClientSecret() string

func UIDomain

func UIDomain() string

func UIPublicURL

func UIPublicURL() string

func UpdateGuideExpiryStatusCron

func UpdateGuideExpiryStatusCron() string

func UpdateIssueExpiryStatusCron

func UpdateIssueExpiryStatusCron() string

func UpdateMemberActiveRankCron

func UpdateMemberActiveRankCron() string

func WildDomain

func WildDomain() string

Types

type Conf

type Conf struct {
	Debug          bool   `env:"DEBUG" default:"false"`
	UCClientID     string `default:"dice" env:"UC_CLIENT_ID"`
	UCClientSecret string `default:"secret" env:"UC_CLIENT_SECRET"`
	WildDomain     string `default:"dev.terminus.io" env:"DICE_ROOT_DOMAIN"`

	MonitorAddr      string `env:"MONITOR_ADDR"`
	GittarAddr       string `env:"GITTAR_ADDR"`
	BundleTimeoutSec int    `env:"BUNDLE_TIMEOUT_SECOND" default:"30"`

	ConsumerNum       int    `env:"CONSUMER_NUM" default:"5"`
	DiceClusterName   string `env:"DICE_CLUSTER_NAME" required:"true"`
	EventboxAddr      string `env:"EVENTBOX_ADDR"`
	CMDBAddr          string `env:"CMDB_ADDR"`
	PipelineAddr      string `env:"PIPELINE_ADDR"`
	NexusAddr         string `env:"NEXUS_ADDR" required:"true"`
	NexusUsername     string `env:"NEXUS_USERNAME" required:"false"`
	NexusPassword     string `env:"NEXUS_PASSWORD" required:"false"`
	SonarAddr         string `env:"SONAR_ADDR" required:"true"`
	SonarPublicURL    string `env:"SONAR_PUBLIC_URL" required:"true"`
	SonarAdminToken   string `env:"SONAR_ADMIN_TOKEN" required:"true"` // dice.yml 里依赖了 sonar,由工具链注入 SONAR_ADMIN_TOKEN
	GolangCILintImage string `env:"GOLANGCI_LINT_IMAGE" default:"registry.cn-hangzhou.aliyuncs.com/terminus/terminus-golangci-lint:1.27"`
	UIPublicURL       string `env:"UI_PUBLIC_URL" required:"true"`
	UIDomain          string `env:"UI_PUBLIC_ADDR" required:"true"`

	// ory/kratos config
	OryEnabled           bool   `default:"false" env:"ORY_ENABLED"`
	OryKratosPrivateAddr string `default:"kratos-admin" env:"ORY_KRATOS_ADMIN_ADDR"`

	CentralNexusPublicURL string `env:"NEXUS_PUBLIC_URL" required:"true"`
	CentralNexusAddr      string `env:"NEXUS_ADDR" required:"true"`
	CentralNexusUsername  string `env:"NEXUS_USERNAME" required:"false"`
	CentralNexusPassword  string `env:"NEXUS_PASSWORD" required:"false"`

	// rsa
	Base64EncodedRsaPublicKey  string `` /* 1114-byte string literal not displayed */
	Base64EncodedRsaPrivateKey string `` /* 4363-byte string literal not displayed */

	// issue management
	MetricsIssueCron string `env:"METRICS_ISSUE_CRON" default:"0 0 0 1/7 * ?"` // metrics issue report monitor execution cycle
	MaxIssueFilterBm int    `env:"MAX_ISSUE_FILTER_BM" default:"10"`

	AvatarStorageURL string `env:"AVATAR_STORAGE_URL"` // file:///avatars or oss://appkey:appsecret@endpoint/bucket

	TestFilePollingIntervalSec  int           `env:"TEST_FILE_POLLING_INTERVAL_SEC" default:"30"`
	TestSetSyncCopyMaxNum       int           `env:"TEST_SET_SYNC_COPY_MAX_NUM" default:"300"`
	TestFileRecordPurgeCycleDay int           `env:"TEST_FILE_RECORD_PURGE_CYCLE_DAY" default:"7"`
	TestFileRecordTimeout       time.Duration `env:"TEST_FILE_RECORD_TIMEOUT" default:"10m"`

	ProjectStatsCacheCron       string `env:"PROJECT_STATS_CACHE_CRON" default:"0 0 1 * * ?"`
	UpdateIssueExpiryStatusCron string `env:"UPDATE_ISSUE_EXPIRY_STATUS_CRON" default:"0 0 * * *"`
	UpdateMemberActiveRankCron  string `env:"UPDATE_MEMBER_ACTIVE_RANK_CRON" default:"0 0 * * *"`
	ExportIssueFileStoreDay     int    `env:"EXPORT_ISSUE_FILE_STORE_DAY" default:"7"`
	UpdateGuideExpiryStatusCron string `env:"UPDATE_GUIDE_EXPIRY_STATUS_CRON" default:"0 0/5 * * * ?"`

	PipelineGrpcClientMaxCallSendSizeBytes int `env:"PIPELINE_GRPC_CLIENT_MAX_SEND_SIZE_BYTES" default:"0"`

	GittarPublicURL string `env:"GITTAR_PUBLIC_URL"`
}

Conf define envs

Jump to

Keyboard shortcuts

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