dependency

package
v1.0.70 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 4 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 ContextWithElasticsearch added in v1.0.70

func ContextWithElasticsearch(ctx context.Context, es *elasticsearch.Client) context.Context

ConextWithElasticsearch returns a context containing the provided elasticsearch 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 ESFromContext added in v1.0.70

func ESFromContext(ctx context.Context, label string) *elasticsearch.Client

func ElasticsearchDependencyHandler added in v1.0.70

func ElasticsearchDependencyHandler(es *elasticsearch.Client) func(http.Handler) http.Handler

ElasticsearchDependencyHandler is a middleware to inject an elasticsearch.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