app

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: 15 Imported by: 26

Documentation

Overview

Package app represents Ottemo application object.

That package contains routines which allows other components to register callbacks on application start/end, API functions for administrator login, system configuration values, etc. So, this package contains the code addressed to application instance. Ottemo packages should address this package to interact with running application instance but not to "github.com/ottemo/foundaton" package".

Index

Constants

View Source
const (
	ConstVersionMajor = 1
	ConstVersionMinor = 4
	ConstSprintNumber = 5

	ConstConfigPathGroup      = "general"
	ConstConfigPathAppGroup   = "general.app"
	ConstConfigPathStoreGroup = "general.store"
	ConstConfigPathMailGroup  = "general.mail"

	ConstConfigPathStorefrontURL = "general.app.storefront_url"
	ConstConfigPathDashboardURL  = "general.app.dashboard_url"
	ConstConfigPathcommerceURL   = "general.app.commerce_url"

	ConstConfigPathStoreName  = "general.store.name"
	ConstConfigPathStoreEmail = "general.store.email"

	ConstConfigPathStoreRootLogin    = "general.store.root_login"
	ConstConfigPathStoreRootPassword = "general.store.root_password"

	ConstConfigPathStoreCountry      = "general.store.country"
	ConstConfigPathStoreState        = "general.store.state"
	ConstConfigPathStoreCity         = "general.store.city"
	ConstConfigPathStoreAddressline1 = "general.store.addressline1"
	ConstConfigPathStoreAddressline2 = "general.store.addressline2"
	ConstConfigPathStoreZip          = "general.store.zip"

	ConstConfigPathStoreTimeZone = "general.store.timezone"

	ConstConfigPathMailFrom      = "general.mail.from"
	ConstConfigPathMailSignature = "general.mail.footer"
	ConstConfigPathMailServer    = "general.mail.server"
	ConstConfigPathMailPort      = "general.mail.port"
	ConstConfigPathMailUser      = "general.mail.user"
	ConstConfigPathMailPassword  = "general.mail.password"

	ConstConfigPathContactUsRecipient = "general.app.recipient"

	ConstConfigPathVerfifyEmail = ConstConfigPathAppGroup + ".verifyemail"

	ConstErrorModule = "app"
	ConstErrorLevel  = env.ConstErrorLevelService

	ConstAllowGuest = true
)

Package global constants

Variables

This section is empty.

Functions

func End

func End() error

End fires application end event for all registered modules

func GetDashboardURL

func GetDashboardURL(path string) string

GetDashboardURL returns url related to dashboard server

func GetSessionTimeZone

func GetSessionTimeZone(session api.InterfaceSession) (string, error)

GetSessionTimeZone - return time zone of session

func GetStorefrontURL

func GetStorefrontURL(path string) string

GetStorefrontURL returns url related to storefront server

func GetVerboseVersion

func GetVerboseVersion() string

GetVerboseVersion returns verbose information about application build

func GetVersion

func GetVersion() string

GetVersion returns current version number

func GetcommerceURL

func GetcommerceURL(path string) string

GetcommerceURL returns url related to commerce server

func Init

func Init() error

Init fires application init event for all registered modules

func OnAppEnd

func OnAppEnd(callback func() error)

OnAppEnd registers callback function on application start event

func OnAppInit

func OnAppInit(callback func() error)

OnAppInit registers callback function on application init event

func OnAppStart

func OnAppStart(callback func() error)

OnAppStart registers callback function on application start event

func SendMail

func SendMail(to string, subject string, body string) error

SendMail sends mail via smtp server specified in config

func SendMailEx

func SendMailEx(headers map[string]string, body string, context map[string]interface{}) error

SendMailEx sends mail via smtp server specified in config - use nil context and/or headers for default values

func Serve

func Serve() error

Serve runs HTTP server in current go routine

func SetSessionTimeZone

func SetSessionTimeZone(session api.InterfaceSession, zone string) (interface{}, error)

SetSessionTimeZone - validate time zone and set it to session

func Start

func Start() error

Start fires application start event for all registered modules

Types

This section is empty.

Directories

Path Synopsis
actors
blog/post
Package post is a default implementation of blog post related interfaces declared in "github.com/ottemo/commerce/app/models/blog/post" package
Package post is a default implementation of blog post related interfaces declared in "github.com/ottemo/commerce/app/models/blog/post" package
cart
Package cart is a default implementation of interfaces declared in "github.com/ottemo/commerce/app/models/cart" package
Package cart is a default implementation of interfaces declared in "github.com/ottemo/commerce/app/models/cart" package
category
Package category is a default implementation of interfaces declared in "github.com/ottemo/commerce/app/models/category" package
Package category is a default implementation of interfaces declared in "github.com/ottemo/commerce/app/models/category" package
checkout
Package checkout is a default implementation of interfaces declared in "github.com/ottemo/commerce/app/models/checkout" package
Package checkout is a default implementation of interfaces declared in "github.com/ottemo/commerce/app/models/checkout" package
cms
Package cms is just a grouping container for sub-packages auto init
Package cms is just a grouping container for sub-packages auto init
cms/block
Package block is a default implementation of cms block related interfaces declared in "github.com/ottemo/commerce/app/models/csm" package
Package block is a default implementation of cms block related interfaces declared in "github.com/ottemo/commerce/app/models/csm" package
cms/media
Package media is a default implementation of cms page related interfaces declared in "github.com/ottemo/commerce/app/models/cms" package
Package media is a default implementation of cms page related interfaces declared in "github.com/ottemo/commerce/app/models/cms" package
cms/page
Package page is a default implementation of cms page related interfaces declared in "github.com/ottemo/commerce/app/models/csm" package
Package page is a default implementation of cms page related interfaces declared in "github.com/ottemo/commerce/app/models/csm" package
discount/coupon
Package coupon is a default implementation of discount interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package coupon is a default implementation of discount interface declared in "github.com/ottemo/commerce/app/models/checkout" package
discount/giftcard
Package giftcard creates and manage gift cards
Package giftcard creates and manage gift cards
discount/saleprice
Package saleprice is an implementation of discount interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package saleprice is an implementation of discount interface declared in "github.com/ottemo/commerce/app/models/checkout" package
order
Package order is a default implementation of interfaces declared in "github.com/ottemo/commerce/app/models/order" package
Package order is a default implementation of interfaces declared in "github.com/ottemo/commerce/app/models/order" package
other/friendmail
Package friendmail is an extension which provides ability to send email to friend
Package friendmail is an extension which provides ability to send email to friend
other/grouping
Package grouping implements products set grouping into another set
Package grouping implements products set grouping into another set
other/trustpilot
Package trustpilot implements trust pilot functions
Package trustpilot implements trust pilot functions
payment/authorizenet
Package authorizenet is a Authorize.Net implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package authorizenet is a Authorize.Net implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
payment/braintree
Package braintree is a "braintree payments" implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package braintree is a "braintree payments" implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
payment/checkmo
Package checkmo is a "Check Money Order" implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package checkmo is a "Check Money Order" implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
payment/paypal
Package paypal is a PayPal implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package paypal is a PayPal implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
payment/zeropay
Package zeropay is a "Zero Payment" implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package zeropay is a "Zero Payment" implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
product
Package product is a implementation of interfaces declared in "github.com/ottemo/commerce/app/models/product" package
Package product is a implementation of interfaces declared in "github.com/ottemo/commerce/app/models/product" package
product/review
Package review is a set of API functions to provide an ability to make reviews for a particular product
Package review is a set of API functions to provide an ability to make reviews for a particular product
rts
Package rts implements Real Time Statistics calculations module
Package rts implements Real Time Statistics calculations module
seo
Package seo implements a set of API intended to provide SEO optimizations
Package seo implements a set of API intended to provide SEO optimizations
shipping/fedex
Package fedex is a FedEx implementation of shipping method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package fedex is a FedEx implementation of shipping method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
shipping/flatrate
Package flatrate is a Flat Rate implementation of shipping method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package flatrate is a Flat Rate implementation of shipping method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
shipping/usps
Package usps is a USPS implementation of shipping method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package usps is a USPS implementation of shipping method interface declared in "github.com/ottemo/commerce/app/models/checkout" package
stock
Package stock is a default implementation of stock interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package stock is a default implementation of stock interface declared in "github.com/ottemo/commerce/app/models/checkout" package
subscription
Package subscription implements base subscription functionality
Package subscription implements base subscription functionality
swatch
Package swatch is a default implementation of product swatches
Package swatch is a default implementation of product swatches
tax
Package tax is a implementation of tax interface declared in "github.com/ottemo/commerce/app/models/checkout" package
Package tax is a implementation of tax interface declared in "github.com/ottemo/commerce/app/models/checkout" package
visitor
Package visitor is a default implementation of models/visitor package visitor related interfaces
Package visitor is a default implementation of models/visitor package visitor related interfaces
visitor/address
Package address is a default implementation of models/visitor package visitor address related interfaces
Package address is a default implementation of models/visitor package visitor address related interfaces
visitor/token
Package token allows to create and use tokens
Package token allows to create and use tokens
helpers
attributes
Package attributes represents an implementation of InterfaceCustomAttributes declared in "github.com/ottemo/commerce/app/models" package.
Package attributes represents an implementation of InterfaceCustomAttributes declared in "github.com/ottemo/commerce/app/models" package.
objectref
Package objectref intended to unify and simplify a way of model instance changes tracking (currently not implemented)
Package objectref intended to unify and simplify a way of model instance changes tracking (currently not implemented)
Package models represents abstraction of business layer object and basic access interfaces for it
Package models represents abstraction of business layer object and basic access interfaces for it
blog/post
Package post represents abstraction of business layer blog post object
Package post represents abstraction of business layer blog post object
cart
Package cart represents abstraction of business layer cart object
Package cart represents abstraction of business layer cart object
category
Package category represents abstraction of business layer category object
Package category represents abstraction of business layer category object
checkout
Package checkout represents abstraction of business layer checkout object
Package checkout represents abstraction of business layer checkout object
cms
Package cms represents abstraction of business layer cms page and cms block objects
Package cms represents abstraction of business layer cms page and cms block objects
order
Package order represents abstraction of business layer purchase order object
Package order represents abstraction of business layer purchase order object
product
Package product represents abstraction of business layer product object
Package product represents abstraction of business layer product object
seo
stock
Package product represents abstraction of business layer product object
Package product represents abstraction of business layer product object
subscription
Package subscription represents abstraction of business layer purchase subscription object
Package subscription represents abstraction of business layer purchase subscription object
visitor
Package visitor represents abstraction of business layer visitor object
Package visitor represents abstraction of business layer visitor object

Jump to

Keyboard shortcuts

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