deps

package
v0.0.0-...-b84af7b Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ENV       string
	AppSecret string

	// SentryURL config
	SentryURL string
)
View Source
var (
	// MongoURL config uri
	MongoURL string
	// MongoName db name
	MongoName string
)
View Source
var (
	// The default value is a legacy bucket used in spartangeek.
	AwsS3Bucket = "spartan-board"
)
View Source
var (
	RedisURL string = "redis://127.0.0.1:6379"
)

Functions

func Bootstrap

func Bootstrap()

Runs ignitors to fulfill deps container.

Types

type Deps

type Deps struct {
	GamingConfigProvider    *model.GamingRules
	DatabaseSessionProvider *mgo.Session
	DatabaseProvider        *mgo.Database
	LoggerProvider          *logging.Logger
	CacheProvider           *redis.Client
	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 IgniteMongoDB

func IgniteMongoDB(container Deps) (Deps, error)

func IgniteS3

func IgniteS3(container Deps) (Deps, error)

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) 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