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 ContextWithOpensearch(ctx context.Context, search *opensearch.Client) context.Context
- func ContextWithRedis(ctx context.Context, rdb redis.Cache) context.Context
- func ContextWithRequestor(ctx context.Context, label string, req httputil.Requestor) 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 OpensearchDependencyHandler(search *opensearch.Client) func(http.Handler) http.Handler
- func OpensearchFromContext(ctx context.Context) *opensearch.Client
- func RDBFromContext(ctx context.Context) redis.Cache
- func RedisDependencyHandler(rdb redis.Cache) func(http.Handler) http.Handler
- func RequestorDependencyHandler(label string, req httputil.Requestor) func(http.Handler) http.Handler
- func RequestorFromContext(ctx context.Context, label string) httputil.Requestor
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 ContextWithOpensearch ¶ added in v1.1.28
ContextWithOpensearch returns a context containing the provided opensearch client.
func ContextWithRedis ¶ added in v1.0.73
ConextWithRedis returns a context containing the provided redis client.
func ContextWithRequestor ¶ added in v1.1.19
func ContextWithRequestor(ctx context.Context, label string, req httputil.Requestor) context.Context
ContextWithRequestor returns a context containing the provided requestor.
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.
func OpensearchDependencyHandler ¶ added in v1.1.29
OpensearchDependencyHandler is a middleware to inject an opensearch.Client into context.
func OpensearchFromContext ¶ added in v1.1.28
func OpensearchFromContext(ctx context.Context) *opensearch.Client
OpensearchFromContext gets an opensearch client from a context.
func RedisDependencyHandler ¶ added in v1.0.73
RedisDependencyHandler is a middleware to inject a redis.Client into context.
Types ¶
This section is empty.