seo

package
v1.4.5-alpha1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConstModelNameSEOItem           = "SEOItem"
	ConstModelNameSEOItemCollection = "SEOCollection"

	ConstErrorModule = "seo"
	ConstErrorLevel  = env.ConstErrorLevelModel
)

Package global constants

Variables

This section is empty.

Functions

func GetSEOTypeAPIPath

func GetSEOTypeAPIPath(seoType string) string

GetSEOTypeAPIPath returns API path for a given seo type

func GetSEOTypeModel

func GetSEOTypeModel(seoType string) string

GetSEOTypeModel returns model name for a given seo type

func IsSEOType

func IsSEOType(seoType string) bool

IsSEOType checks existence of given seo type

func RegisterSEOEngine

func RegisterSEOEngine(seoEngine InterfaceSEOEngine) error

RegisterSEOEngine registers given SEO engine in system

func RegisterSEOType

func RegisterSEOType(seoType string, apiPath string, modelName string) error

RegisterSEOType registers SEO type association in system

func UnRegisterSEOEngine

func UnRegisterSEOEngine() error

UnRegisterSEOEngine removes currently using SEO engine from system

Types

type InterfaceSEOCollection

type InterfaceSEOCollection interface {
	ListSEOItems() []InterfaceSEOItem

	models.InterfaceCollection
}

InterfaceSEOCollection represents interface to access business layer implementation of SEO items collection

type InterfaceSEOEngine

type InterfaceSEOEngine interface {
	GetSEO(seoType string, objectID string, urlPattern string) []InterfaceSEOItem
}

InterfaceSEOEngine represents interface to access business layer implementation of SEO engine

func GetRegisteredSEOEngine

func GetRegisteredSEOEngine() InterfaceSEOEngine

GetRegisteredSEOEngine returns currently using SEO engine or nil

type InterfaceSEOItem

type InterfaceSEOItem interface {
	GetURL() string
	SetURL(newURL string) error

	GetRewrite() string

	GetTitle() string
	GetType() string
	GetMetaKeywords() string
	GetMetaDescription() string

	models.InterfaceModel
	models.InterfaceObject
	models.InterfaceStorable
	models.InterfaceListable
}

InterfaceSEOItem represents interface to access business layer implementation of SEO item object

func GetSEO

func GetSEO(seoType string, objectID string, urlPattern string) []InterfaceSEOItem

GetSEO shortcut to registered engine method

func GetSEOItemModel

func GetSEOItemModel() (InterfaceSEOItem, error)

GetSEOItemModel retrieves current InterfaceSEOItem model implementation

func GetSEOItemModelAndSetID

func GetSEOItemModelAndSetID(SEOItemID string) (InterfaceSEOItem, error)

GetSEOItemModelAndSetID retrieves current InterfaceSEOItem model implementation and sets its ID to some value

func LoadSEOItemByID

func LoadSEOItemByID(SEOItemID string) (InterfaceSEOItem, error)

LoadSEOItemByID loads SEOItem data into current InterfaceSEOItem model implementation

Jump to

Keyboard shortcuts

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