Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
type Mongo interface {
Collection(MongoCollectionName) *mongo.Collection
Ping(ctx context.Context) error
RawClient() *mongo.Client
RawDatabase() *mongo.Database
}
type MongoCollectionName ¶
type MongoCollectionName string
type Prometheus ¶
type Prometheus interface {
Register(prometheus.Registerer)
ResponseTimeMilliseconds() prometheus.Histogram
}
type Redis ¶
type Redis interface {
Ping(ctx context.Context) error
Subscribe(ctx context.Context, ch chan string, subscribeTo ...string)
Get(ctx context.Context, key string) (interface{}, error)
SetEX(ctx context.Context, key string, value interface{}, ttl time.Duration) error
SetNX(ctx context.Context, key string, value interface{}, ttl time.Duration) (bool, error)
Pipeline(ctx context.Context) redis.Pipeliner
}
Click to show internal directories.
Click to hide internal directories.