config

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//APP_PATH       = "/app"
	EVENT_TRAFFIC  = "Traffic"
	EVENT_LANDING  = "Landing"
	EVENT_CLICK    = "Click Landing"
	EVENT_REDIRECT = "Redirect"

	OK_DESC          = "OK"
	BAD_REQUEST_DESC = "Bad Request"
)

Variables

View Source
var APP_PATH = "/Users/wiliewahyuhidayat/Documents/GO/mediaplatform/cores/" // local

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	AppHost                                string
	AppHostPort                            string
	AppApi                                 string
	AppApiPort                             string
	RedisHost                              string
	RedisPort                              int
	RedisPwd                               string
	RedisKeyExpiration                     int64
	PSQLHost                               string
	PSQLUsername                           string
	PSQLPassword                           string
	PSQLPort                               string
	PSQLDB                                 string
	RabbitMQHost                           string
	RabbitMQPort                           int
	RabbitMQUsername                       string
	RabbitMQPassword                       string
	RabbitMQVHost                          string
	RabbitMQDataType                       string
	RabbitMQPixelStorageExchangeName       string
	RabbitMQPixelStorageQueueName          string
	RabbitMQRedisCounterExchangeName       string
	RabbitMQRedisCounterQueueName          string
	RabbitMQRatioExchangeName              string
	RabbitMQRatioQueueName                 string
	RabbitMQPostbackAdnetExchangeName      string
	RabbitMQPostbackAdnetQueueName         string
	RabbitMQCampaignManagementExchangeName string
	RabbitMQCampaignManagementQueueName    string
	RabbitMQAlertManagementExchangeName    string
	RabbitMQAlertManagementQueueName       string
	LogEnv                                 string
	LogPath                                string
	LogLevel                               string
	TZ                                     *time.Location
}

func InitCfg

func InitCfg() *Cfg

func (*Cfg) InitGormPgx added in v0.9.6

func (c *Cfg) InitGormPgx(l *logrus.Logger) *gorm.DB

func (*Cfg) InitMessageBroker

func (c *Cfg) InitMessageBroker() rmqp.AMQP

func (*Cfg) InitPsql

func (c *Cfg) InitPsql(l *logrus.Logger) *sql.DB

func (*Cfg) InitRedis

func (c *Cfg) InitRedis(l *logrus.Logger, dbindex int) *redis.Client

func (*Cfg) InitRedisJSON

func (c *Cfg) InitRedisJSON(l *logrus.Logger, dbindex int) *rueidis.Storage

func (*Cfg) Initiate

func (c *Cfg) Initiate(logname string) *Setup

type Setup

type Setup struct {
	Config *Cfg
	Logs   *logrus.Logger
	R      *rueidis.Storage
	DB     *gorm.DB
	Rmqp   rmqp.AMQP
}

Jump to

Keyboard shortcuts

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