dependency

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

type Dependency interface {
	GetMiddleware() interfaces.Middleware
	GetBroker() interfaces.Broker
	GetSQLDatabase() interfaces.SQLDatabase
	GetMongoDatabase() interfaces.MongoDatabase
	GetRedisPool() interfaces.RedisPool
	GetKey() interfaces.RSAKey
	GetValidator() interfaces.Validator
	GetExtended() map[string]interface{}
	AddExtended(key string, value interface{})
}

Dependency base

func InitDependency

func InitDependency(opts ...Option) Dependency

InitDependency constructor

type Option

type Option func(*deps)

Option func type

func SetBroker

func SetBroker(broker interfaces.Broker) Option

SetBroker option func

func SetExtended

func SetExtended(ext map[string]interface{}) Option

SetExtended option func

func SetKey

func SetKey(key interfaces.RSAKey) Option

SetKey option func

func SetMiddleware

func SetMiddleware(mw interfaces.Middleware) Option

SetMiddleware option func

func SetMongoDatabase

func SetMongoDatabase(db interfaces.MongoDatabase) Option

SetMongoDatabase option func

func SetRedisPool

func SetRedisPool(db interfaces.RedisPool) Option

SetRedisPool option func

func SetSQLDatabase

func SetSQLDatabase(db interfaces.SQLDatabase) Option

SetSQLDatabase option func

func SetValidator

func SetValidator(validator interfaces.Validator) Option

SetValidator option func

Jump to

Keyboard shortcuts

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