Documentation
¶
Index ¶
- Constants
- Variables
- func ConnectDB(ctx context.Context, cfg DBConfig) (*sql.DB, error)
- type DBConfig
- type Magento1
- func (m1 *Magento1) BaseURLs(ctx context.Context, docroot string) ([]string, error)
- func (b *Magento1) ConfigPath() string
- func (b *Magento1) Name() string
- func (m1 *Magento1) ParseConfig(cfgPath string) (*StoreConfig, error)
- func (b *Magento1) UniquePath() string
- func (m1 *Magento1) Version(docroot string) (string, error)
- type Magento2
- func (m2 *Magento2) BaseURLs(ctx context.Context, docroot string) ([]string, error)
- func (b *Magento2) ConfigPath() string
- func (b *Magento2) Name() string
- func (m2 *Magento2) ParseConfig(cfgPath string) (*StoreConfig, error)
- func (b *Magento2) UniquePath() string
- func (m2 *Magento2) Version(docroot string) (string, error)
- type OpenCart4
- func (oc4 *OpenCart4) BaseURLs(_ context.Context, docroot string) ([]string, error)
- func (b *OpenCart4) ConfigPath() string
- func (b *OpenCart4) Name() string
- func (oc4 *OpenCart4) ParseConfig(cfgPath string) (*StoreConfig, error)
- func (b *OpenCart4) UniquePath() string
- func (oc4 *OpenCart4) Version(docroot string) (string, error)
- type PlatformInterface
- type Prestashop6
- func (b *Prestashop6) BaseURLs(_ context.Context, _ string) ([]string, error)
- func (b *Prestashop6) ConfigPath() string
- func (b *Prestashop6) Name() string
- func (p *Prestashop6) ParseConfig(cfgPath string) (*StoreConfig, error)
- func (b *Prestashop6) UniquePath() string
- func (b *Prestashop6) Version(_ string) (string, error)
- type Prestashop7
- func (b *Prestashop7) BaseURLs(_ context.Context, _ string) ([]string, error)
- func (b *Prestashop7) ConfigPath() string
- func (b *Prestashop7) Name() string
- func (p *Prestashop7) ParseConfig(cfgPath string) (*StoreConfig, error)
- func (b *Prestashop7) UniquePath() string
- func (b *Prestashop7) Version(_ string) (string, error)
- type Shopware5
- func (b *Shopware5) BaseURLs(_ context.Context, _ string) ([]string, error)
- func (b *Shopware5) ConfigPath() string
- func (b *Shopware5) Name() string
- func (b *Shopware5) ParseConfig(_ string) (*StoreConfig, error)
- func (b *Shopware5) UniquePath() string
- func (b *Shopware5) Version(_ string) (string, error)
- type Shopware6
- func (s *Shopware6) BaseURLs(ctx context.Context, docroot string) ([]string, error)
- func (b *Shopware6) ConfigPath() string
- func (b *Shopware6) Name() string
- func (s *Shopware6) ParseConfig(cfgPath string) (*StoreConfig, error)
- func (b *Shopware6) UniquePath() string
- func (s *Shopware6) Version(docroot string) (string, error)
- type Store
- type StoreConfig
- type WooCommerce
- func (w *WooCommerce) BaseURLs(ctx context.Context, docroot string) ([]string, error)
- func (b *WooCommerce) ConfigPath() string
- func (b *WooCommerce) Name() string
- func (w *WooCommerce) ParseConfig(cfgPath string) (*StoreConfig, error)
- func (b *WooCommerce) UniquePath() string
- func (w *WooCommerce) Version(docroot string) (string, error)
Constants ¶
View Source
const (
// DATABASE_URL=mysql://db-user-1:rhPb5xC2242444mFZDB@localhost:3306/db-1
DBURL = `(?m)^\s*DATABASE_URL\s*="?\s*mysql://(.+?):(.+?)@(.+?):(\d+)/(.+?)"?$`
)
Variables ¶
View Source
var AllPlatforms = []PlatformInterface{ &Magento1{ basePlatform{ "Magento 1", "app/etc/local.xml", "app/etc/local.xml", }, "n98-magerun", }, &Magento2{ basePlatform{ "Magento 2", "app/etc/env.php", "app/etc/env.php", }, "n98-magerun2", }, &Shopware5{ basePlatform{ "Shopware 5", "config.php", "engine/Shopware/Application.php", }, }, &Shopware6{ basePlatform{ "Shopware 6", ".env", "vendor/shopware/core/Framework/ShopwareException.php", }, }, &Prestashop6{ basePlatform{ "Prestashop 6", "config/settings.inc.php", "config/settings.inc.php", }, }, &Prestashop7{ basePlatform{ "Prestashop 7", "app/config/parameters.php", "app/config/parameters.php", }, }, &WooCommerce{ basePlatform{ "WooCommerce", "wp-config.php", "wp-config.php", }, }, &OpenCart4{ basePlatform{ "OpenCart 4", "config.php", "system/engine/config.php", }, }, }
Functions ¶
Types ¶
type DBConfig ¶
func (*DBConfig) SafePrefix ¶
type Magento1 ¶
type Magento1 struct {
Magerun string
// contains filtered or unexported fields
}
func (*Magento1) ConfigPath ¶
func (b *Magento1) ConfigPath() string
func (*Magento1) ParseConfig ¶
func (m1 *Magento1) ParseConfig(cfgPath string) (*StoreConfig, error)
func (*Magento1) UniquePath ¶
func (b *Magento1) UniquePath() string
type Magento2 ¶
type Magento2 struct {
Magerun string
// contains filtered or unexported fields
}
func (*Magento2) ConfigPath ¶
func (b *Magento2) ConfigPath() string
func (*Magento2) ParseConfig ¶
func (m2 *Magento2) ParseConfig(cfgPath string) (*StoreConfig, error)
func (*Magento2) UniquePath ¶
func (b *Magento2) UniquePath() string
type OpenCart4 ¶
type OpenCart4 struct {
// contains filtered or unexported fields
}
func (*OpenCart4) ConfigPath ¶
func (b *OpenCart4) ConfigPath() string
func (*OpenCart4) ParseConfig ¶
func (oc4 *OpenCart4) ParseConfig(cfgPath string) (*StoreConfig, error)
func (*OpenCart4) UniquePath ¶
func (b *OpenCart4) UniquePath() string
type PlatformInterface ¶
type Prestashop6 ¶
type Prestashop6 struct {
// contains filtered or unexported fields
}
func (*Prestashop6) ConfigPath ¶
func (b *Prestashop6) ConfigPath() string
func (*Prestashop6) ParseConfig ¶
func (p *Prestashop6) ParseConfig(cfgPath string) (*StoreConfig, error)
func (*Prestashop6) UniquePath ¶
func (b *Prestashop6) UniquePath() string
type Prestashop7 ¶
type Prestashop7 struct {
// contains filtered or unexported fields
}
func (*Prestashop7) ConfigPath ¶
func (b *Prestashop7) ConfigPath() string
func (*Prestashop7) ParseConfig ¶
func (p *Prestashop7) ParseConfig(cfgPath string) (*StoreConfig, error)
func (*Prestashop7) UniquePath ¶
func (b *Prestashop7) UniquePath() string
type Shopware5 ¶
type Shopware5 struct {
// contains filtered or unexported fields
}
func (*Shopware5) ConfigPath ¶
func (b *Shopware5) ConfigPath() string
func (*Shopware5) ParseConfig ¶
func (b *Shopware5) ParseConfig(_ string) (*StoreConfig, error)
func (*Shopware5) UniquePath ¶
func (b *Shopware5) UniquePath() string
type Shopware6 ¶
type Shopware6 struct {
// contains filtered or unexported fields
}
func (*Shopware6) ConfigPath ¶
func (b *Shopware6) ConfigPath() string
func (*Shopware6) ParseConfig ¶
func (s *Shopware6) ParseConfig(cfgPath string) (*StoreConfig, error)
func (*Shopware6) UniquePath ¶
func (b *Shopware6) UniquePath() string
type Store ¶
type Store struct {
DocRoot string
Platform PlatformInterface
Config *StoreConfig
}
func DiscoverStores ¶
func DiscoverStores() []*Store
DiscoverStores searches several common docroot locations for stores
func FindStoreAtRoot ¶
func FindStoreAtUniquePath ¶
For recursively walking the filesystem: derive a store from a uniquely identifying path
func (*Store) ConfigPath ¶
type StoreConfig ¶
type WooCommerce ¶
type WooCommerce struct {
// contains filtered or unexported fields
}
func (*WooCommerce) ConfigPath ¶
func (b *WooCommerce) ConfigPath() string
func (*WooCommerce) ParseConfig ¶
func (w *WooCommerce) ParseConfig(cfgPath string) (*StoreConfig, error)
func (*WooCommerce) UniquePath ¶
func (b *WooCommerce) UniquePath() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.