Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionName ¶
type CollectionName string
type Mongo ¶
type Mongo interface {
Collection(name CollectionName) *mongo.Collection
Ping(ctx context.Context) error
RawClient() *mongo.Client
RawDatabase() *mongo.Database
}
type Redis ¶
type Redis interface {
Subscribe(ctx context.Context, ch chan string, subscribeTo ...string)
Ping(ctx context.Context) error
Publish(ctx context.Context, channel string, content string) error
Expire(ctx context.Context, key string, ttl time.Duration) error
Del(ctx context.Context, key string) error
Get(ctx context.Context, key string) (interface{}, error)
SetNX(ctx context.Context, key string, value string, ttl time.Duration) (bool, error)
SetEX(ctx context.Context, key string, value string, ttl time.Duration) error
Set(ctx context.Context, key string, value string) error
RawClient() *redis.Client
}
Click to show internal directories.
Click to hide internal directories.