instance

package
v0.0.0-...-f537024 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discord

type Discord interface {
	RegisterCommand(prefix string, cmd command.Cmd) error
	DeregisterCommand(prefix string, cmd command.Cmd) error
	SendMessage(channelID string, msg *discordgo.MessageSend) (*discordgo.Message, error)
	SendPrivateMessage(userID string, msg *discordgo.MessageSend) (*discordgo.Message, error)
	Member(guildID string, userID string) (*discordgo.Member, error)
	AddHandler(handler interface{}) func()
}

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)
}

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) (string, error)
	Del(ctx context.Context, key string) (int, error)
	Set(ctx context.Context, key string, value string) 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)
	Expire(ctx context.Context, key string, ttl time.Duration) error
	Pipeline(ctx context.Context) redis.Pipeliner
	Exists(ctx context.Context, key string) (bool, error)
	SAdd(ctx context.Context, key string, value string) error
	TTL(ctx context.Context, key string) (time.Duration, error)
}

Jump to

Keyboard shortcuts

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