deps

package
v0.0.0-...-8ef0ebb Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap()

Runs ignitors to fulfill deps container.

Types

type Deps

type Deps struct {
	ConfigProvider          *config.Config
	GamingConfigProvider    *model.GamingRules
	DatabaseSessionProvider *mgo.Session
	DatabaseProvider        *mgo.Database
	LoggerProvider          *logging.Logger
	MailerProvider          mail.Mailer
	CacheProvider           *goredis.Redis
	S3Provider              *s3.Bucket
	LedisProvider           *ledis.DB
}
var (
	Container Deps
)

Contains bootstraped dependencies.

func IgniteCache

func IgniteCache(container Deps) (Deps, error)

func IgniteConfig

func IgniteConfig(d Deps) (container Deps, err error)

func IgniteLedisDB

func IgniteLedisDB(container Deps) (Deps, error)

func IgniteLogger

func IgniteLogger(container Deps) (Deps, error)

func IgniteMailer

func IgniteMailer(container Deps) (Deps, error)

Bootstraps mailer driver.

func IgniteMongoDB

func IgniteMongoDB(container Deps) (Deps, error)

func IgniteS3

func IgniteS3(container Deps) (Deps, error)

func (Deps) Config

func (d Deps) Config() *config.Config

func (Deps) GamingConfig

func (d Deps) GamingConfig() *model.GamingRules

func (Deps) LedisDB

func (d Deps) LedisDB() *ledis.DB

func (Deps) Log

func (d Deps) Log() *logging.Logger

func (Deps) Mailer

func (d Deps) Mailer() mail.Mailer

func (Deps) Mgo

func (d Deps) Mgo() *mgo.Database

func (Deps) MgoSession

func (d Deps) MgoSession() *mgo.Session

func (Deps) S3

func (d Deps) S3() *s3.Bucket

type Ignitor

type Ignitor func(Deps) (Deps, error)

An ignitor takes a Container and injects bootstraped dependencies.

Jump to

Keyboard shortcuts

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