config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Log  LogConfig
	Grpc GrpcConfig

	Mysql struct {
		Host     string `default:"notification-db"`
		Port     int    `default:"3306"`
		User     string `default:"root"`
		Password string `default:"password"`
		Database string `default:"notification"`
		Disable  bool   `default:"false"`
		LogMode  bool   `default:"false"`
	}

	Queue struct {
		Addr string `default:"redis://notification-redis:6379"`
		Type string `default:"redis"`
	}

	Email struct {
		Protocol      string `default:"SMTP"`
		EmailHost     string `default:"mail.app-center.cn"`
		Port          int    `default:"25"`
		DisplaySender string `default:"admin_openpitrix"`
		Email         string `default:"openpitrix@app-center.cn"`
		Password      string `default:"openpitrix"`
		SSLEnable     bool   `default:"false"`
		FromEmailAddr string `default:"openpitrix@app-center.cn"`
	}

	App struct {
		Host string `default:"notification-manager"`
		Port int    `default:"9201"`

		ApiHost string `default:"notification-manager"`
		ApiPort int    `default:"9200"`

		MaxWorkingNotifications int `default:"15"`
		MaxWorkingTasks         int `default:"15"`
		MaxTaskRetryTimes       int `default:"1"`
	}

	Websocket struct {
		//Service string `default:"op,ks"`
		Service string `default:"none"`
	}
}

func GetInstance

func GetInstance() *Config

func (*Config) GetFlagSet

func (c *Config) GetFlagSet() *flag.FlagSet

func (*Config) LoadConf

func (c *Config) LoadConf() *Config

func (*Config) ParseFlag

func (c *Config) ParseFlag()

func (*Config) PrintUsage

func (c *Config) PrintUsage()

type GrpcConfig

type GrpcConfig struct {
	ShowErrorCause bool `default:"false"` // show grpc error cause to frontend
}

type LogConfig

type LogConfig struct {
	//Level string `default:"error"` // debug, info, warn, error, fatal
	Level string `default:"info"`
}

Jump to

Keyboard shortcuts

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