config

package
v0.0.0-...-a1224c5 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEchoLogConfig

func GetEchoLogConfig(appConf *AppConfig) middleware.LoggerConfig

Types

type AppConfig

type AppConfig struct {
	Environment string `json:"environment"`
	AppPort     string `json:"app_port"`
	BaseURL     string `json:"base_url"`
	DatabaseURL string `json:"database_url"`
	RedisURL    string `json:"redis_url"`

	Validator   echo.Validator        `json:"-"`
	CORSConfig  middleware.CORSConfig `json:"-"`
	FirebaseApp *firebase.App         `json:"-"`

	// 3rd-parties settings
	AutoMigrate bool   `json:"auto_migrate"`
	LogLevel    string `json:"log_level"`

	AuthProvider        string `json:"auth_provider"`
	FirebaseCreds       string `json:"firebase_creds"`
	FirebaseAuthCreds   string `json:"firebase_auth_creds"`
	KratosWebhookApiKey string `json:"kratos_webhook_api_key"`
	KratosApiEndpoint   string `json:"kratos_api_endpoint"`
}

AppConfig - Init app config

func InitAppConfig

func InitAppConfig() (*AppConfig, error)

type AppValidator

type AppValidator struct {
	// contains filtered or unexported fields
}

func (*AppValidator) Validate

func (cv *AppValidator) Validate(i interface{}) error

Jump to

Keyboard shortcuts

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