Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container interface { // AutoMigrate the data connections AutoMigrate(clearExitstingData bool) error // UserProvider safely builds and returns the Provider UserProvider() (user.Provider, error) // SessionProvider safely builds and returns the Provider SessionProvider() (session.Provider, error) // UserSettingsProvider safely builds and returns the Provider UserSettingsProvider() (usersettings.Provider, error) }
Container exposes data providers
func NewProduction ¶
NewProduction builds a container with all of the config
type Mockable ¶
type Mockable struct { UserProviderValue *user.Mockable UserProviderError error UserSettingsProviderValue *usersettings.Mockable UserSettingsProviderError error SessionProviderValue *session.Mockable SessionProviderError error }
Mockable container struct
func (*Mockable) AutoMigrate ¶
AutoMigrate the data connection
func (*Mockable) SessionProvider ¶
SessionProvider safely builds and returns the Provider
func (*Mockable) UserProvider ¶
UserProvider safely builds and returns the Provider
func (*Mockable) UserSettingsProvider ¶
func (m *Mockable) UserSettingsProvider() (usersettings.Provider, error)
UserSettingsProvider safely builds and returns the Provider
type Production ¶
type Production struct {
// contains filtered or unexported fields
}
Production is our production container for our external connections
func (*Production) AutoMigrate ¶
func (c *Production) AutoMigrate(clearExitstingData bool) error
AutoMigrate the data connections
func (*Production) SessionProvider ¶
func (c *Production) SessionProvider() (session.Provider, error)
SessionProvider safely builds and returns the Provider
func (*Production) UserProvider ¶
func (c *Production) UserProvider() (user.Provider, error)
UserProvider safely builds and returns the Provider
func (*Production) UserSettingsProvider ¶
func (c *Production) UserSettingsProvider() (usersettings.Provider, error)
UserSettingsProvider safely builds and returns the Provider
Click to show internal directories.
Click to hide internal directories.