gf_solo_service

package
v0.0.0-...-a1b0e2b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: GPL-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdsInit

func CmdsInit(pExternalPlugins *gf_core.ExternalPlugins) *cobra.Command

func Run

func Run(pConfig *GFconfig,
	pRuntimeSys *gf_core.RuntimeSys)

Types

type GFconfig

type GFconfig struct {

	// ENVIRONMENT
	EnvStr string `mapstructure:"env"`

	// DOMAINS - where this gf_solo instance is reachable on
	DomainBaseStr      string `mapstructure:"domain_base"`
	DomainAdminBaseStr string `mapstructure:"domain_admin_base"`

	// DOMAIN_FOR_AUTH_COOKIES - domain/pattern that is set on the auth cookies to restrict their scope.
	DomainForAuthCookiesStr string `mapstructure:"domain_for_auth_cookies"`

	// PORTS
	PortStr        string `mapstructure:"port"`
	PortAdminStr   string `mapstructure:"port_admin"`
	PortMetricsStr string `mapstructure:"port_metrics"`

	// SQL
	SQLuserNameStr string `mapstructure:"sql_user_name"`
	SQLpassStr     string `mapstructure:"sql_pass"`
	SQLhostStr     string `mapstructure:"sql_host"`
	SQLdbNameStr   string `mapstructure:"sql_db_name"`

	// MONGODB - this is the dedicated mongodb DB
	MongoHostStr   string `mapstructure:"mongodb_host"`
	MongoDBnameStr string `mapstructure:"mongodb_db_name"`

	// ELASTICSEARCH
	ElasticsearchHostStr string `mapstructure:"elasticsearch_host"`

	// SENTRY_ENDPOINT
	SentryEndpointStr string `mapstructure:"sentry_endpoint"`

	// TEMPLATES
	TemplatesPathsMap map[string]string `mapstructure:"templates_paths"`

	//--------------------
	// IDENTITY
	AuthSubsystemTypeStr       string `mapstructure:"auth_subsystem_type"`
	AdminMFAsecretKeyBase32str string `mapstructure:"admin_mfa_secret_key_base32"`
	AdminEmailStr              string `mapstructure:"admin_email"`

	//--------------------
	// GF_IMAGES
	ImagesConfigFilePathStr string `mapstructure:"images__config_file_path"`

	AnalyticsPyStatsDirsLst []string `mapstructure:"analytics__py_stats_dirs"`
	AnalyticsRunIndexerBool bool     `mapstructure:"analytics__run_indexer"`

	CrawlConfigFilePathStr     string `mapstructure:"crawl__config_file_path"`
	CrawlClusterNodeTypeStr    string `mapstructure:"crawl__cluster_node_type"`
	CrawlImagesLocalDirPathStr string `mapstructure:"crawl__images_local_dir_path"`

	//--------------------
	// ALCHEMY
	AlchemyAPIkeyStr string `mapstructure:"alchemy_api_key"`

	//--------------------
	// NEW_STORAGE_ENGINE - flag indicating if the new image storage engine should be used
	ImagesUseNewStorageEngineBool bool `mapstructure:"images_use_new_storage_engine"`

	// IPFS
	IPFSnodeHostStr string `mapstructure:"ipfs_node_host"`
}

func ConfigInit

func ConfigInit(pConfigDirPathStr string,
	pConfigFileNameStr string) (*GFconfig, error)

load config for gf_solo from all the sources. Viper lib is used for config loading. configs are loaded from: - ENV vars - gf_solo.yaml config file - via CLI args

func RuntimeGet

func RuntimeGet(pConfigPathStr string,
	pExternalPlugins *gf_core.ExternalPlugins,
	pLogFun func(string, string),
	pLogNewFun gf_core.GFlogFun) (*gf_core.RuntimeSys, *GFconfig, error)

Jump to

Keyboard shortcuts

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