configs

package
v0.0.0-...-4963dd4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunVoiceCall

type AliyunVoiceCall struct {
	AccessKey          string `json:"-"`
	AccessSecret       string `json:"-"`
	CalledShowNumber   string `json:"called_show_number"`
	TTSCode            string `json:"tts_code"`
	TTSTemplateVarName string `json:"tts_template_var_name"`
	BaseURI            string `json:"base_uri"`
}

type Config

type Config struct {
	PreviewURL string `json:"preview_url"`
	ReportURL  string `json:"report_url"`
	Listen     string `json:"listen"`
	GRPCListen string `json:"grpc_listen"`
	GRPCToken  string `json:"-"`

	MongoURI          string `json:"mongo_uri"`
	MongoDB           string `json:"mongo_db"`
	APIToken          string `json:"-"`
	UseLocalDashboard bool   `json:"use_local_dashboard"`

	// NoJobMode 启用该标识后,将停止事件聚合和队列消费
	NoJobMode bool `json:"no_job_mode"`

	AggregationPeriod     time.Duration `json:"aggregation_period"`
	ActionTriggerPeriod   time.Duration `json:"action_trigger_period"`
	QueueJobMaxRetryTimes int           `json:"queue_job_max_retry_times"`
	QueueWorkerNum        int           `json:"queue_worker_num"`
	QueryTimeout          time.Duration `json:"query_timeout"`

	KeepPeriod       int `json:"keep_period"`
	SyslogKeepPeriod int `json:"syslog_keep_period"`

	Migrate   bool `json:"migrate"`
	ReMigrate bool `json:"re_migrate"`

	AliyunVoiceCall AliyunVoiceCall `json:"aliyun_voice_call"`
	EmailSMTP       EmailSMTP       `json:"email_smtp"`
	Jira            Jira            `json:"jira"`
}

func Get

func Get(cc infra.Resolver) *Config

Get return config object from container

func (*Config) Serialize

func (conf *Config) Serialize() string

type EmailSMTP

type EmailSMTP struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"-"`
}

type Jira

type Jira struct {
	BaseURL  string `json:"base_url"`
	Username string `json:"username"`
	Password string `json:"-"`
}

Jump to

Keyboard shortcuts

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