config

package
v0.0.0-...-8f0a619 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Application struct {
		Name        string
		Port        int
		Environment string
		Debug       bool
		Timeout     time.Duration
		Timezone    *time.Location
		TMUser      struct {
			BaseURL string
		}
		TMOrder struct {
			BaseURL string
		}
	}
	Crypto struct {
		Secret string
	}
	OpenTelemetry struct {
		Collector struct {
			Endpoint string
		}
	}
	CORS struct {
		AllowedOrigins   []string
		AllowedMethods   []string
		AllowedHeaders   []string
		ExposedHeaders   []string
		MaxAge           int
		AllowCredentials bool
	}
	JWT struct {
		PrivateKey []byte
		PublicKey  []byte
	}
	Postgresql struct {
		Host         string
		Port         int
		User         string
		Password     string
		DBName       string
		SSLMode      string
		MaxOpenConns int
		MaxIdleConns int
	}
	Redis struct {
		Addrs    []string
		Username string
		Password string
		DB       int
	}
	Kafka struct {
		Hosts            string
		SecurityProtocol string
		SASLMechanisms   string
		SASLUsername     string
		SASLPassword     string
		SessionTimeout   int
	}
	GCP struct {
		ProjectID      string
		ServiceAccount []byte
	}
	Order struct {
		Expiration              time.Duration
		TaxChargePercentage     float64
		ServiceChargePercentage float64
	}
	Midtrans struct {
		BaseURL      string
		BasicAuthKey string
	}
}

func Get

func Get() *Config

Jump to

Keyboard shortcuts

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