config

package
v0.0.0-...-a88cfdc Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetToContext

func SetToContext(ctx context.Context, config *AppConfig) context.Context

Types

type AppConfig

type AppConfig struct {
	// worker node id
	WorkerID int `json:"worker_id"`
	// mode; debug 发送的为测试环境的 push; production 为线上环境的 push
	Mode string `json:"mode"`
	// server port
	Port               int                                        `json:"port"`
	LogMode            string                                     `json:"log_mode"`
	LogFilePath        string                                     `json:"log_file_path"`
	ClientConfig       map[string]config_entries.ClientConfigItem `json:"client_config"`
	DBConfig           config_entries.DBConfigItem                `json:"db_config"`
	CacheConfig        config_entries.CacheConfig                 `json:"cache_config"`
	ApplePushConfig    config_entries.ApplePushSecretConfig       `json:"apple_push_config"`
	FirebasePushConfig config_entries.FirebaseConfig              `json:"firebase_push_config"`
	Mq                 config_entries.MqConfig                    `json:"mq"`
}

func GetFromContext

func GetFromContext(ctx context.Context) *AppConfig

func InitConfig

func InitConfig() *AppConfig

type SetConfigToContextKey

type SetConfigToContextKey string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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