dependency

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithDatabase

func ContextWithDatabase(ctx context.Context, label string, db godb.Database) context.Context

ConextWithDatabase returns a context containing the provided database.

func ContextWithElasticsearchV6 added in v1.0.75

func ContextWithElasticsearchV6(ctx context.Context, es *elasticsearch6.Client) context.Context

ContextWithElasticsearchV6 returns a context containing the provided elasticsearch client.

func ContextWithElasticsearchV7 added in v1.0.75

func ContextWithElasticsearchV7(ctx context.Context, es *elasticsearch7.Client) context.Context

ContextWithElasticsearchV7 returns a context containing the provided elasticsearch client.

func ContextWithRedis added in v1.0.73

func ContextWithRedis(ctx context.Context, rdb *redis.Client) context.Context

ConextWithRedis returns a context containing the provided redis client.

func DBFromContext

func DBFromContext(ctx context.Context, label string) godb.Database

func DatabaseDependencyHandler

func DatabaseDependencyHandler(label string, db godb.Database) func(http.Handler) http.Handler

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

func ElasticsearchV6DependencyHandler(es *elasticsearch6.Client) func(http.Handler) http.Handler

ElasticsearchV6DependencyHandler is a middleware to inject an elasticsearchv6.Client into context.

func ElasticsearchV7DependencyHandler added in v1.0.75

func ElasticsearchV7DependencyHandler(es *elasticsearch7.Client) func(http.Handler) http.Handler

ElasticsearchV7DependencyHandler is a middleware to inject an elasticsearchv7.Client into context.

func RDBFromContext added in v1.0.73

func RDBFromContext(ctx context.Context) *redis.Client

func RedisDependencyHandler added in v1.0.73

func RedisDependencyHandler(rdb *redis.Client) func(http.Handler) http.Handler

RedisDependencyHandler is a middleware to inject a redis.Client into context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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