Documentation ¶
Index ¶
- func ContextWithDatabase(ctx context.Context, label string, db godb.Database) context.Context
- func ContextWithElasticsearchV6(ctx context.Context, es *elasticsearch6.Client) context.Context
- func ContextWithElasticsearchV7(ctx context.Context, es *elasticsearch7.Client) context.Context
- func ContextWithRedis(ctx context.Context, rdb *redis.Client) context.Context
- func DBFromContext(ctx context.Context, label string) godb.Database
- func DatabaseDependencyHandler(label string, db godb.Database) func(http.Handler) http.Handler
- func ESV6FromContext(ctx context.Context) *elasticsearch6.Client
- func ESV7FromContext(ctx context.Context) *elasticsearch7.Client
- func ElasticsearchV6DependencyHandler(es *elasticsearch6.Client) func(http.Handler) http.Handler
- func ElasticsearchV7DependencyHandler(es *elasticsearch7.Client) func(http.Handler) http.Handler
- func RDBFromContext(ctx context.Context) *redis.Client
- func RedisDependencyHandler(rdb *redis.Client) func(http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithDatabase ¶
ConextWithDatabase returns a context containing the provided database.
func ContextWithElasticsearchV6 ¶ added in v1.0.75
ContextWithElasticsearchV6 returns a context containing the provided elasticsearch client.
func ContextWithElasticsearchV7 ¶ added in v1.0.75
ContextWithElasticsearchV7 returns a context containing the provided elasticsearch client.
func ContextWithRedis ¶ added in v1.0.73
ConextWithRedis returns a context containing the provided redis client.
func DatabaseDependencyHandler ¶
DatabaseDependencyHandler is a middleware to inject a database into context.
func ESV6FromContext ¶ added in v1.0.75
func ESV6FromContext(ctx context.Context) *elasticsearch6.Client
ESV6FromContext gets an elasticsearch client from a context.
func ESV7FromContext ¶ added in v1.0.75
func ESV7FromContext(ctx context.Context) *elasticsearch7.Client
ESV7FromContext gets an elasticsearch client from a context.
func ElasticsearchV6DependencyHandler ¶ added in v1.0.75
ElasticsearchV6DependencyHandler is a middleware to inject an elasticsearchv6.Client into context.
func ElasticsearchV7DependencyHandler ¶ added in v1.0.75
ElasticsearchV7DependencyHandler is a middleware to inject an elasticsearchv7.Client into context.
Types ¶
This section is empty.