magento

package
v0.0.0-...-6f8fa1e Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2016 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package magento contains helper functions to handle the different versions.

Distinguish between Magento 1 and Magento 2.

Magento is a trademark of MAGENTO, INC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version int

Version specific type which defines the current installed version of database tables.

const (
	Version1 Version = 2 << (iota + 1)
	Version2
	VersionAll = Version1 | Version2
)

Version* defines the return values of Version() function.

func DetectVersion

func DetectVersion(prefix string, tableList []string) Version

DetectVersion detects the running version by reading the list of tables. It searches for the tables core_store, core_website, core_store_group and api_user for Magento v1. It searches for the tables integration, store_website, store_group and authorization_role for Magento v2. Prefix is the prefix for each table. Returns zero if the version cannot be detected.

Jump to

Keyboard shortcuts

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