Documentation ¶
Index ¶
- type Factory
- func (factory *Factory) ByContext(ctx echo.Context) (*domain.Factory, error)
- func (factory *Factory) ByDomainID(domainID string) (config.Domain, *domain.Factory, error)
- func (factory *Factory) ByDomainName(name string) (*domain.Factory, error)
- func (factory *Factory) Config() config.Config
- func (factory *Factory) DeleteDomain(domainID string) error
- func (factory *Factory) DeleteProvider(providerID string) error
- func (factory *Factory) DomainByID(domainID string) (config.Domain, error)
- func (factory *Factory) EditorJS() *goeditorjs.HTMLEngine
- func (factory *Factory) Email() *service.ServerEmail
- func (factory *Factory) Filesystem() service.Filesystem
- func (factory *Factory) FuncMap() template.FuncMap
- func (factory *Factory) Icons() icon.Provider
- func (factory *Factory) ListDomains() []config.Domain
- func (factory *Factory) NormalizeHostname(hostname string) string
- func (factory *Factory) PutDomain(configuration config.Domain) error
- func (factory *Factory) PutProvider(oauthClient config.Provider) error
- func (factory *Factory) Steranko(ctx echo.Context) (*steranko.Steranko, error)
- func (factory *Factory) Template() *service.Template
- func (factory *Factory) Theme() *service.Theme
- func (factory *Factory) UpdateConfig(value config.Config) error
- func (factory *Factory) Widget() *service.Widget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory manages all server-level services, and generates individual domain factories for each domain
func NewFactory ¶
NewFactory uses the provided configuration data to generate a new Factory if there are any errors connecting to a domain's datasource, NewFactory will derp.Report the error, but will continue loading without those domains.
func (*Factory) ByDomainID ¶
ByDomainID retrieves a domain using a DomainID
func (*Factory) ByDomainName ¶
ByDomainName retrieves a domain using a Domain Name
func (*Factory) DeleteDomain ¶
DeleteDomain removes a domain from the Factory
func (*Factory) DeleteProvider ¶
DeleteConnection removes a domain from the Factory
func (*Factory) DomainByID ¶
DomainByID finds a domain in the configuration by its ID
func (*Factory) EditorJS ¶
func (factory *Factory) EditorJS() *goeditorjs.HTMLEngine
EditorJS returns the EditorJS adapter for the Content service
func (*Factory) Email ¶
func (factory *Factory) Email() *service.ServerEmail
Email returns the global email service
func (*Factory) Filesystem ¶
func (factory *Factory) Filesystem() service.Filesystem
Filesystem returns the global filesystem service
func (*Factory) ListDomains ¶
ListDomains returns a list of all domains in the Factory
func (*Factory) NormalizeHostname ¶
NormalizeHostname removes some inconsistencies in host names, including a leading "www", if present
func (*Factory) PutProvider ¶
PutConnection adds a domain to the Factory
func (*Factory) Steranko ¶
Steranko implements the steranko.Factory method, used for locating the specific steranko instance used by a domain.
func (*Factory) UpdateConfig ¶
UpdateConfig updates the configuration for the Factory