Documentation ¶
Index ¶
- type MongoClient
- func (m *MongoClient) CreatePlayer(ctx context.Context, player *models.Player) error
- func (m *MongoClient) FindOnePlayer(ctx context.Context, filters *bson.M) (models.Player, error)
- func (m *MongoClient) FindPlayers(ctx context.Context, filters *bson.M) ([]models.Player, error)
- func (m *MongoClient) GetPlayerCollection() *mongo.Collection
- func (m *MongoClient) ModifyPlayer(ctx context.Context, playerID string, modifyFilter *bson.M) error
- func (c *MongoClient) Ready() bool
- type MongoDBClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoClient ¶
func (*MongoClient) CreatePlayer ¶
func (*MongoClient) FindOnePlayer ¶
func (*MongoClient) FindPlayers ¶
func (*MongoClient) GetPlayerCollection ¶
func (m *MongoClient) GetPlayerCollection() *mongo.Collection
func (*MongoClient) ModifyPlayer ¶
func (*MongoClient) Ready ¶
func (c *MongoClient) Ready() bool
type MongoDBClient ¶
type MongoDBClient interface { Ready() bool //Players CreatePlayer(context.Context, *models.Player) error FindOnePlayer(context.Context, *bson.M) (models.Player, error) FindPlayers(context.Context, *bson.M) ([]models.Player, error) ModifyPlayer(ctx context.Context, playerID string, modifyFilter *bson.M) error }
func ReturnMongoClient ¶
func ReturnMongoClient() (MongoDBClient, error)
Click to show internal directories.
Click to hide internal directories.